質問編集履歴

1

追加

2019/05/06 02:32

投稿

fu_3823
fu_3823

スコア81

test CHANGED
File without changes
test CHANGED
@@ -7,3 +7,85 @@
7
7
  環境変数など、何か具体的なやり方があるのでしょうか。
8
8
 
9
9
  pyhton3.7のインストールはできています。
10
+
11
+
12
+
13
+ 以下のコードでシンボリックリンクを張りなおすやり方にたどり着きましたが、
14
+
15
+ 同様にやてってもエラーになります。
16
+
17
+ ```linux
18
+
19
+ $ which python
20
+
21
+ /usr/bin/python
22
+
23
+ $ls -l /usr/bin/python
24
+
25
+ /usr/bin/python -> python2.7
26
+
27
+
28
+
29
+ which python3
30
+
31
+ /usr/bin/python3
32
+
33
+ $ ls -l /usr/bin/python3
34
+
35
+ /usr/bin/python3 -> python3.5
36
+
37
+ ------
38
+
39
+ mkdir -p $HOME/bin
40
+
41
+ ln -s /usr/bin/python3.6 $HOME/bin/python
42
+
43
+ ```↓エラー
44
+
45
+ failed to create symbolic link ‘/home/vagrant/bin/python’: File exists
46
+
47
+
48
+
49
+ わたしの環境は以下のとおりでした。
50
+
51
+ ```linaux
52
+
53
+ $ which python
54
+
55
+ /home/vagrant/scraping/bin/python
56
+
57
+ $ ls -l /home/vagrant/scraping/bin/python
58
+
59
+ /home/vagrant/scraping/bin/python -> python3
60
+
61
+
62
+
63
+ $ which python3
64
+
65
+ /home/vagrant/scraping/bin/python3
66
+
67
+ $ ls -l /home/vagrant/scraping/bin/python3
68
+
69
+ /home/vagrant/scraping/bin/python3 -> /usr/bin/python3
70
+
71
+
72
+
73
+
74
+
75
+ $ which python3.7
76
+
77
+ /usr/local/bin/python3.7
78
+
79
+ $ ls -l /usr/local/bin/python3.7
80
+
81
+ /usr/local/bin/python3.7
82
+
83
+ ```
84
+
85
+ ★の確認コードでpython3.7にリンクがないことわかったのですが、その後、シンボリックリンクをつくることができません。
86
+
87
+ どのようなコードを書くとよいのでしょう。
88
+
89
+ それとも、パスにあるvagrantとlocalの違いが原因で、仮想環境からpython3.7への
90
+
91
+ アクセスはできないのでしょうか。