之前没有特意下载过Python软件包,但是locate搜索是已安装啦,但是运行xx.py时总出现错误,如下:
Traceback (most recent call last):
File "validate_output.py", line 3, in <module>
import numpy as np
ImportError: No module named numpy
然后我就安装numpy。
sudo apt-get install python-numpy
结果已经是最新版本啦。
接着运行命令:
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
终端输入python2.7 validate_output.py install #结果不行。
终端输入python3.4 validate_output.py install #结果就成功啦。