mac 简易安装问题
我尝试使用 easy_install 安装 python 包。我使用了 /usr/local/bin 中的 easy_install,因为我认为这是 macpython 提供的。我遇到过这个问题:
ValueError: numpy >= 1.4 is required (detected 1.2.1 from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/__init__.pyc)
似乎在检查依赖项时,easy_install 正在查看 Mac 附带的 python 指向的目录。
我怎样才能改变这个?
I've tried to install a python package using easy_install. I used the easy_install from /usr/local/bin as I thought that was the one supplied by macpython. I've encountered this problem:
ValueError: numpy >= 1.4 is required (detected 1.2.1 from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/__init__.pyc)
It seems like when checking for dependencies, easy_install is looking at the directory pointed by python that was shipped with Mac.
How can I alter this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您运行的 python 版本与系统提供的版本不同,
找到该版本的框架 bin 目录,例如:
然后运行该目录中的 easy_install 版本:
If you are running a different version of python from the system supplied one,
find the framework bin directory for that version, for example:
Then run the version of easy_install that is in that directory:
您可以将
virtualenv
与--no-site-packages
一起使用,然后将包安装到那里。您可能还想研究pip
而不是easy_install
。You can use
virtualenv
with--no-site-packages
then install your package into there. You might also want to investigatepip
instead ofeasy_install
.