Python 2.7 使用macports安装scipy时出现问题
我是编程新手,正在尝试导入scipy 问题: 当我尝试在terminal中的python解释器中导入scipy时,它如下所示:Python 2.7 使用macports安装scipy时出现问题,python-2.7,installation,scipy,macports,Python 2.7,Installation,Scipy,Macports,我是编程新手,正在尝试导入scipy 问题: 当我尝试在terminal中的python解释器中导入scipy时,它如下所示: [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import scipy Traceback (m
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named scipy
>>>
我也关注了这个帖子:
但似乎无法为自己找到答案
澄清:
当我运行“哪条python”
我明白了
当我运行“端口内容py27 packagename”
我明白了
提前感谢安装python模块时,MacPorts不会接触系统python。它确实为自己的python版本安装了这些模块,默认情况下,python版本位于
/opt/local/bin/python2.7
中。使用sudo-port-select--set-python-python27
在shell中键入python
时,可以将其设置为默认运行的python
sudo port install py27-numpy py27-scipy py27-matplotlib py27-ipython +notebook py27-pandas py27-sympy py27-nose
/usr/bin/python
Port py27-packagename is not installed.