[英]How can I set the path for python3 properly?
$ echo $PATH
/usr/local/share/python:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
所以/ usr / local / bin就在我的路上。
当我做`哪个python3'
/usr/local/bin/python3
当我然后尝试创建virtualenv
mkvirtualenv py3000 --python=python3
The executable /Users/misdirectedpuffin/python3 (from --python=/Users/misdirectedpuffin/python3) does not exist
Virtualenv在使用默认python时工作,即mkvirtualenv testenv' and when doing 'mkvirtualenv py3000 --python=/usr/local/bin/python3
它似乎在寻找$ HOME for python3。 我怎么能纠正这个?
**编辑**
我还可以设置export python3=/usr/local/bin/python3
在bash_profile
,然后调用$python3
与--python=$python3
,但我真正想要的是--python=python3
没有美元符号。
做完brew doctor
后,我被告知以下情况:
Warning: /usr/local/share/python is not needed in PATH.
Formerly homebrew put Python scripts you installed via `pip` or `pip3`
(or `easy_install`) into that directory above but now it can be removed
from your PATH variable.
Python scripts will now install into /usr/local/bin.
You can delete anything, except 'Extras', from the /usr/local/share/python
(and /usr/local/share/python3) dir and install affected Python packages
anew with `pip install --upgrade`.
Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
在进行这些更改后,我能够使用mkvirtualenv py3000 -p python3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.