关于iPython:easy_install在Mac OS 10.5.8上找不到我的Python
我在我的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找到我的东西?我是不是做错了什么?
1 个回答
3
你想知道 easy_install
是哪个版本的 Python 用的吗?可以用 which easy_install
命令查看文件的顶部内容。我敢打赌它是 Python 2.6 的版本。看看你有没有 easy_install-2.7
这样的东西,如果有的话就用那个。如果没有,那就确保你用正确的 Python 版本重新安装 setuptools。
最后,我觉得你不需要特别指定 easy_install readline
,因为当你用 easy_install
安装 iPython 的时候,readline 会自动作为依赖项被安装上。