无法使用brewed python在Mac 10.9 Mavericks上安装virtualenv

时间:2014-03-14 01:42:30

标签: python macos python-2.7 virtualenv homebrew

我正在尝试设置virtualenv以保持我的python env干净整洁。 好吧,实际上我正在尝试安装scrapy,因为我写了here,它打开了这些python蠕虫,我现在正在尝试清理virtualenv之后。 / p>

最后的判决是安装virtualenv(这是失败的),因此这篇文章。这就是我所在的地方:

$ virtualenv test
-bash: virtualenv: command not found

我知道这意味着virtualenv通过pip install virtualenv安装的路径不在我的路径中,但应该遵循以下规则:

  1. Can't pip install virtualenv in OS X 10.8 with brewed python 2.7

  2. http://hackercodex.com/guide/python-development-environment-on-mac-osx/

  3. https://github.com/Homebrew/homebrew/issues/12667#issuecomment-6257342

  4. http://www.lowindata.com/2013/installing-scientific-python-on-mac-os-x/

  5. Delete all virtualenv and start from scratch

  6. brew doctor返回ready to brew

    我的猜测是我的系统python和我的brew python并没有很好地发挥,但我想知道我还能做些什么来解决这个问题。

    此时我愿意对所有内容(甚至是mac os x)进行全新安装(如果需要的话)。我很确定我sudo pip install一段时间以前的某些事情我现在正在付出代价。

    安装的更多细节:

    ~ ∮ pip install virtualenv
    Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/site-packages
    Cleaning up...
    ~ ∮ pip install virtualenvwrapper
    Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /usr/local/lib/python2.7/site-packages
    Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
    Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
    Requirement already satisfied (use --upgrade to upgrade): stevedore in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
    Cleaning up...
    

    我试过了两个 brew install python --with-brewed-opensslbrew install python --framework(卸载之前没有工作时)(以及上述链接中的所有其他建议)

    提前感谢!

1 个答案:

答案 0 :(得分:5)

virtualenv看起来在错误的地方。在Mac 10.9上,它应该在/usr/local/bin/virtualenv

在virtualenv上尝试pip uninstall,然后使用pip重新安装,看看它是否将它放在正确的位置。