$ 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
没有美元符号。< / p>
答案 0 :(得分:0)
在做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