virtualenv
尽管进行了种种尝试,我还是无法上班。我virtualenv
使用以下命令安装在MAC OS X上:
pip install virtualenv
并已将新增PATH
至我的.bash_profile
。每当我尝试运行该virtualenv
命令时,它都会返回:
-bash: virtualenv: command not found
每次运行pip install virtualenv
,它都会返回:
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
我了解在Mac中,virtualenv
应正确安装
/usr/local/bin
在virtualenv
确实安装/usr/local/bin
,但每当我试图运行virtualenv
命令,该命令没有找到。我也尝试virtualenv
在目录中运行命令/usr/local/bin
,它给我相同的结果:
-bash: virtualenv: command not found
这些是我添加到.bash_profile中的路径
export PATH=$PATH:/usr/local/bin
export PATH=$PATH:/usr/local/bin/python
export PATH=$PATH:/Library/Framework/Python.framework/Version/2.7/lib/site-packages
有任何解决方法吗?为什么会这样呢?
$ ln -s /usr/bin/virtualenv /Library/Framework/Python.framework/Version/2.7/lib/site-packages/virtualenv/virtualenv.py
ln -s /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py /usr/local/bin/virtualenv