擅长:python、mysql、java
<p>我也遇到了同样的问题,更新路径没有任何帮助,也没有设置VIRTUALENVWRAPPER_PYTHON和VIRTUALENVWRAPPER_VIRTUALENV。这是因为我在运行我的python版本时看到了这种奇怪的行为:</p>
<pre><code>$ /usr/local/bin/python
Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.executable
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
</code></pre>
<p>我可以通过使用brew卸载python、使用brew重新安装python并强制它覆盖/usr/local/bin中的现有符号链接来修复所有问题。</p>
<pre><code>$ brew uninstall --force python
$ brew install python
$ brew link --overwrite python
$ brew linkapps python
$ pip install --upgrade pip setuptools
$ sudo pip uninstall virtualenv
$ pip install virtualenv
$ sudo pip uninstall virtualenvwrapper
$ pip install virtualenvwrapper
</code></pre>
<p>希望你在六个月前遇到这个问题的时候能够克服它。我想发布我的解决方案,以防其他人遇到相同的问题,无法通过设置路径和env变量来解决。</p>