我試圖運行一個需要安裝Numpy的程序。我認爲這是因爲如果我嘗試sudo apt-get install python-numpy
它告訴我,ImportError:沒有名爲numpy的模塊
sudo apt-get install python-numpy
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-numpy is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
但是當我去安裝我想(內的程序目錄,其中setup.py所在地)我得到的程序:
python setup.py install
Traceback (most recent call last):
File "setup.py", line 20, in <module>
from weblogolib import __version__
File "/home/chris/Documents/IS/Bioinformatics-Software/weblogo-3.3/weblogolib/__init__.py", line 108, in <module>
from numpy import array, asarray, float64, ones, zeros, int32,all,any, shape
ImportError: No module named numpy
當我查看Python-2.7.3/Lib/site-packages目錄時,那裏只有一個README文件。那裏不應該有Numpy的東西(和其他安裝Python模塊)?
我運行Ubuntu 12.04與Python 2.7
使用dpkg -l python-numpy
我得到:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii python-numpy 1:1.6.1-6ubunt Numerical Python adds a fast array facility
嘿,我有蟒蛇2.7和Ubuntu 12.04。我將'dpkg -l python-numpy'的結果添加到了原始文章中。我不確定,但我認爲它說沒有安裝? – user1784467 2013-03-14 05:13:21
對不起,我的意思是'dpkg -L python-numpy'。它已安裝('ii'),您也已經說過您已安裝。我只是想讓你檢查文件的安裝位置。 – gpoo 2013-03-14 05:15:14
似乎它的大部分是在/usr/lib/python2.7/中,但是由於它的確是安裝的,所以我覺得這會讓'python setup.py install'的結果更加令人困惑lol – user1784467 2013-03-14 05:22:43