我正在尝试运行一个包含以下语句的python脚本:
import random as RD
import pylab as PL
import scipy as SP
import networkx as NX
我在哪里可以下载这些软件包?
我安装了这些软件包,运行代码时出现以下错误
运行代码时出现以下错误
Traceback (most recent call last):
File "C:\Documents and Settings\hplabs\Desktop\Dushyant\networkdemo.py", line 7, in <module>
import pylab as PL
File "C:\Python26\lib\site-packages\pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "C:\Python26\lib\site-packages\matplotlib\__init__.py", line 129, in <module>
from rcsetup import defaultParams, validate_backend, validate_toolbar
File "C:\Python26\lib\site-packages\matplotlib\rcsetup.py", line 19, in <module>
from matplotlib.colors import is_color_like
File "C:\Python26\lib\site-packages\matplotlib\colors.py", line 52, in <module>
import numpy as np
ImportError: No module named numpy
答案 0 :(得分:2)
答案 1 :(得分:2)
答案 2 :(得分:2)
答案 3 :(得分:1)
安装Scipy时,还需要安装它依赖的numpy。见here。您收到错误是因为您的系统上未安装numpy。