質問編集履歴
5
修正したことがあったので追加した
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,11 +2,9 @@
|
|
2
2
|
|
3
3
|
VS codeで、pythonインタープリタを追加したい。
|
4
4
|
|
5
|
+
(https://ja.stackoverflow.com/questions/48705/vs-code-にvenv環境を認識させたい)
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
##
|
7
|
+
## 発生している問題・エラーメッセージ
|
10
8
|
|
11
9
|
VScodeのユーザー設定で、python.pythonPath部分に、仮想環境上にあるpython環境のパスを記述しても、インタープリタを選択しようとした時に、選択肢として出てこない。
|
12
10
|
|
4
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,8 +24,6 @@
|
|
24
24
|
|
25
25
|
"remote.onstartup": true,
|
26
26
|
|
27
|
-
"python.disableInstallationCheck": true
|
28
|
-
|
29
27
|
}
|
30
28
|
|
31
29
|
|
@@ -48,8 +46,6 @@
|
|
48
46
|
|
49
47
|
OS: High sierra
|
50
48
|
|
51
|
-
VM: Virtual Box
|
52
|
-
|
53
49
|
仮想環境:vagrant
|
54
50
|
|
55
51
|
ゲストOS:ubuntu16.04
|
@@ -68,4 +64,4 @@
|
|
68
64
|
|
69
65
|
その後{"python.pythonPath": "/home/vagrant/work/venv/bin/python"}と記述したのですが、このpathでゲスト上の python ということは認識されるのでしょうか?
|
70
66
|
|
71
|
-
|
67
|
+
2. ホスト上の pythonから codeコマンドを実行すると、VScodeを起動できます。また、ゲスト上の pythonでも、hoge.py を実行できました。
|
3
修正したことがあったので追加した
test
CHANGED
File without changes
|
test
CHANGED
@@ -55,3 +55,17 @@
|
|
55
55
|
ゲストOS:ubuntu16.04
|
56
56
|
|
57
57
|
Python3: 3.6.4
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
###修正したこと
|
62
|
+
|
63
|
+
1.実行しようとしていたのは、ゲスト上にインストールしたPythonです。
|
64
|
+
|
65
|
+
ホスト上は /Users/username/.pyenv/versions/3.6.4/bin/python
|
66
|
+
|
67
|
+
ゲスト上は /home/vagrant/work/venv/bin/python にそれぞれインストールし直しました。
|
68
|
+
|
69
|
+
その後{"python.pythonPath": "/home/vagrant/work/venv/bin/python"}と記述したのですが、このpathでゲスト上の python ということは認識されるのでしょうか?
|
70
|
+
|
71
|
+
2. ホスト上の pythonから codeコマンドを実行すると、VScodeを起動できます。また、ゲスト上の pythonでも、hoge.py を実行できました。
|
2
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
{
|
20
20
|
|
21
|
-
** "python.pythonPath": "/home/vagrant/work/venv/bin/python
|
21
|
+
** "python.pythonPath": "/home/vagrant/work/venv/bin/python"**,
|
22
22
|
|
23
23
|
"python.jediEnabled": false,
|
24
24
|
|
1
ソースコードに間違いがあったので修正しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
{
|
20
20
|
|
21
|
-
** "python.pythonPath": "/
|
21
|
+
** "python.pythonPath": "/home/vagrant/work/venv/bin/python3.6"**,
|
22
22
|
|
23
23
|
"python.jediEnabled": false,
|
24
24
|
|