【问题标题】:Trouble with virtualenv on Mountain Lion Developer Preview 2Mountain Lion 开发者预览版 2 上的 virtualenv 出现问题
【发布时间】:2012-04-04 15:12:02
【问题描述】:

所以我刚刚更新到 Mountain Lion 开发者预览版 2,突然间我的 python 开发环境就差不多了。尝试创建新的 virtualenv 时,我得到以下信息:

jcroft@MacBook-Pro:~/Development/Python/_VirtualEnvs$ virtualenv test
New python executable in test/bin/python
ERROR: The executable test/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/System/Library/Frameworks/Python.framework/Versions/2.7' (should be u'/Users/jcroft/Development/Python/_VirtualEnvs/test')
ERROR: virtualenv is not compatible with this system or executable

有什么线索吗?提前致谢!

【问题讨论】:

  • 如果您之前的 python 版本与 Mountain Lion 中包含的版本不同,那么您很可能需要再次重建您的 python 包。您是否尝试重新安装 virtualenv?
  • 是的,我删除了我的 virtualenvs 并通过自制软件重新安装了 python,然后做了一个 sudo pip install virtualenv

标签: python django virtualenv osx-mountain-lion


【解决方案1】:

你需要确保将/usr/local/share/python添加到你的PATH,否则它仍然会尝试使用Apple安装的easy_install。

更多信息在这里:https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python

【讨论】:

    猜你喜欢
    • 2012-01-27
    • 1970-01-01
    • 1970-01-01
    • 2012-08-02
    • 1970-01-01
    • 1970-01-01
    • 2012-12-26
    • 1970-01-01
    • 2012-12-07
    相关资源
    最近更新 更多