views:

132

answers:

4

I am trying to run a python script which has the following statements:

import random as RD
import pylab as PL
import scipy as SP
import networkx as NX

Where can I download these packages?

I have installed these packages and I get the following error when I run my code

I am getting the following error when I run the code

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
+1  A: 
  1. 'random' is shipped with the standard library
  2. pylab and scipy are part of SciPy
  3. Networkx is available here
Yann Ramin
+1  A: 

Here's a link to the non standard libraries. random is part of the standard library.

matplotlib

scipy

networkX

numpy (reuired by scipy)

ars
+1  A: 

random is a standard python library module, no need to install that.

pylab and scipy can be found on the SciPy site

networkx also has a site

BTW: These are all easily found using google.com

Ber
A: 

When installing Scipy, you also need to install numpy which it depends on. See here. You are getting the error because numpy is not installed on your system.

Raja