【发布时间】:2012-12-05 07:38:20
【问题描述】:
[使用 Mac OSX 10.6.8]
我正在尝试将 networkx 安装到 python 2.7,但它一直在尝试将其安装到 2.6 版(当我升级到 2.7 时已卸载)
我尝试了一个未指定版本的 easy_install,它得到了 2.6 版本
命令:
easy_install networkx
输出
Searching for networkx
Best match: networkx 1.7
Processing networkx-1.7-py2.6.egg
Removing networkx 1.7 from easy-install.pth file
Adding networkx 1.7 to easy-install.pth file
Using /Library/Python/2.6/site-packages/networkx-1.7-py2.6.egg
Processing dependencies for networkx
Finished processing dependencies for networkx
smms-baldrick:20121205_coif kirstin$
我尝试下载python 2.7版本并直接安装它,但它仍然去了2.6的库
命令:
easy_install http://networkx.lanl.gov/download/networkx/networkx-1.7-py2.7.egg
输出
Downloading http://networkx.lanl.gov/download/networkx/networkx-1.7-py2.7.egg
Processing networkx-1.7-py2.7.egg
removing '/Library/Python/2.6/site-packages/networkx-1.7-py2.7.egg' (and everything under it)
creating /Library/Python/2.6/site-packages/networkx-1.7-py2.7.egg
Extracting networkx-1.7-py2.7.egg to /Library/Python/2.6/site-packages
networkx 1.7 is already the active version in easy-install.pth
Installed /Library/Python/2.6/site-packages/networkx-1.7-py2.7.egg
Processing dependencies for networkx==1.7
Finished processing dependencies for networkx==1.7
【问题讨论】:
-
远射,但是您系统上的默认 Python 版本是什么?我最好/唯一的猜测是您正在使用 Python 2.6 运行 `easy_install,它以 2.6 需要的方式安装它。你试过直接用 2.7 调用吗?
-
您使用的是哪个操作系统?检查 PATH 环境变量并确保 python27 安装存在于路径中,而不是 python26
-
谢谢,我已经为 python 2.7 重新安装了 setuptools 0.6c11,但问题似乎仍然存在。
-
我也试过 echo $PATH 那里没有看起来像 python 2.6 的东西
标签: python macos python-2.7 networkx