4
我是新手編程並試圖導入scipy。使用macports安裝scipy時遇到問題
問題:
當我嘗試在終端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 (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named scipy
>>>
我似乎已經正確安裝使用MacPorts。我可以像上面一樣成功導入numpy。
我原先安裝SciPy的按 「MacPorts的」 說明書上http://www.scipy.org/install.html
即:
sudo port install py27-numpy py27-scipy py27-matplotlib py27-ipython +notebook py27-pandas py27-sympy py27-nose
我也跟着這個帖子: Python will not recognize MacPorts installed packages
但也似乎沒有得到一個答案我自己
澄清:
當我跑我得到
/usr/bin/python
「的蟒蛇」 當我運行 「端口內容py27,軟件包名」 我得到提前
Port py27-packagename is not installed.
感謝