I'm working with python 2.7 (32-bit) on Windows Vista. I downloaded some libraries including numpy, scipy, and pygame. When I try to import these modules the output says
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import numpy
ImportError: No module named numpy
I can find these modules in my python folders but for some reason it doesn't want to recognize it or some thing. (I made sure the file were compatible before downloading.)
3 Answers 3
Each package should contain a setup.py file. Run this with the command python setup.py install
For more information:
http://www.scipy.org/Installing_SciPy/Windows http://pygame.org/install.html
1 Comment
"Everytime I run the command "python setup.py install" in the python shell it says SyntaxError: invalid syntax "
Please create a folder where you unzip the "numpy.zip" file, say the folder name is "c:\numpy"
Open a MS-DOS terminal (as described here : http://en.wikipedia.org/wiki/Command-line_interface), and type :
cd c:\numpy
python setup.py config
python setup.py install
This will set up the needed files in the correct folders for your python. Enjoy !
5 Comments
To properly install this module:
- In the Windows search bar (START MENU) type Command Prompt
- Right-click on the Command Prompt icon (DO NOT go to cmd)
- Click Run as Administrator
- in the COMMAND PROMPT (DO NOT open cmd) type:
pip install numpy
This will install that module.
NOTE: If you are NOT in admin mode, you will get a message saying a fatal error has been raised.
python setup.py installin each of the packages