找到MacPorts软件包? [英] Locate MacPorts package?

查看:67
本文介绍了找到MacPorts软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚通过MacPorts安装了py27-numpy软件包,当我使用以下命令时,python将找不到该模块:import scipy

I just installed the py27-numpy package via MacPorts and python will not find the module when I use this command: import scipy

我使用了help('modules')命令,但scipy端口没有打开.

I used the help('modules') command and the scipy port did not come up.

很明显,路径配置不正确或MacPorts没有正确安装,但是无论哪种方式,知道此软件包的安装位置都可以解决我的问题.

Clearly the path is not configured correctly or MacPorts is not installing in the correct place, but either way, it would solve my problem to know where this package is being installed.

在哪里可以找到MacPorts安装的软件包py27-scipy的路径?

echo $PATH 命令的输出:

/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr /local/bin:/usr/X11/bin:directory/bin

/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:directory/bin

我在任何这些位置都找不到包裹.

I cannot find the package in any of those locations.

感谢您的帮助.

推荐答案

您的PATH不正确.它似乎正在拾取另一个Python 2.7,可能是使用python.org或其他地方的二进制安装程序安装的,而不是MacPorts安装的.尝试从PATH中删除/Library/Frameworks/Python.framework/Versions/2.7/bin或直接调用MacPorts Python:

Your PATH is incorrect. It appears to be picking up another Python 2.7, likely one installed using a binary installer from python.org or elsewhere, and not the MacPorts installed one. Try removing the the /Library/Frameworks/Python.framework/Versions/2.7/bin from PATH or just invoke the MacPorts Python directly:

/opt/local/bin/python2.7

这篇关于找到MacPorts软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆