【问题标题】:toward iPython: easy_install can't find my Python(s) on Mac OS 10.5.8向 iPython:easy_install 在 Mac OS 10.5.8 上找不到我的 Python
【发布时间】:2011-11-07 17:58:55
【问题描述】:

在我的 Mac OS 10.5.8 上安装了 setuptools-0.6c11-py2.7.egg 但随后

sudo easy_install readline ipython

产生可能的脚本问题?

Processing readline-6.2.0.tar.gz
Running readline-6.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-N_JiZD/readline-  6.2.0/egg-dist-tmp-9IRgCS
No eggs found in /tmp/easy_install-N_JiZD/readline-6.2.0/egg-dist-tmp-9IRgCS (setup script problem?)

而easy_install 找不到我的Python

ERROR: 'IPython requires Python Version 2.6 or above.' 
Exiting.
error: Setup script exited with 1

但是我刚刚安装了 2.7 并且我的活动版本是 3.0.1

$ ls /Library/Frameworks/Python.framework/Versions/
2.7 3.0 Current

根据我在这里找到的提示,我尝试将 setuptools 直接安装到 .../2.7/bin/ 但我得到的只是来自 easy_install 的讲座

setuptools 0.6c11 is already the active version in easy-install.pth

我在这里看到的另一个提示是运行

$ python2.7 setup.py install               
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'setup.py': [Errno 2] No such file or directory

这个结果令人不安。我如何帮助 easy_install 找到我的东西?我做了什么傻事吗?

【问题讨论】:

  • 注意,Python 3.0.1 是 Python 3 的一个非常早期的版本。众所周知,它存在许多问题,并在 Python 3.1 发布后立即停用。 Python 3.2.1 是最新的(3.2.2 将于下周发布)。
  • 感谢您指出这一点。我不会使用 Python 3-point-anything,至少暂时不会,但我很高兴我知道要注意它。

标签: python macos setuptools ipython easy-install


【解决方案1】:

easy_install 用于哪个版本的 python?查看which easy_install 列出的文件的顶部。我敢打赌它是 Python 2.6。看看你是否有easy_install-2.7 或类似的,如果你有,就使用它。如果没有,请确保使用 正确的 python 版本重新安装 setuptools。

最后,我不认为你是 need to specify easy_install readline,因为当 iPyhon 为 easy_installed 时,它将作为 iPython 的依赖项自动安装。

【讨论】:

  • #!/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
  • 非常感谢! easy_install-2.7 运行时有很多“警告”,但它运行了!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-05-14
  • 1970-01-01
  • 2011-01-27
  • 2011-04-23
  • 2012-05-21
  • 2010-12-08
  • 2011-01-27
相关资源
最近更新 更多