尽管我做了各种尝试,但还是无法让virtualenv工作。我在MAC OS X上使用以下方法安装virtualenv:
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命令时,都找不到该命令。我还尝试在/usr/local/bin目录下运行virtualenv命令,它给了我相同的结果:
-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
有什么解决办法吗?为什么会这样呢?