Reputation: 77
I am using Python 3.4.0. I am going to assume that the numpy
module should work, as this is one of the newer versions of python. However, anything I do with numpy
will result in a syntax error. Forexample this code here:
import numpy
list1=[1,3,2,6,9]
list2=numpy.mean(list1)
print(list2)
And then I get:
Traceback (most recent call last):
File "/home/yichen/Desktop/python/numpy test.py", line 1, in <module>
import numpy
ImportError: No module named 'numpy'
Is this just a problem with my computer or what?
Upvotes: 0
Views: 251
Reputation: 18381
It looks like numpy
is not installed on your system. Assuming that you have the pip
script installed with your python, you can perform following command to install it:
pip install numpy
or
pip3.4 install numpy
Or, depending on your distribution, it might come as a package named like python-numpy
with your package manager.
Upvotes: 1