PYTHON: Error in recognising numpy module -
i using python 3.4.0. going assume numpy module should work, 1 of newer versions of python. however, numpy result in syntax error. forexample code here:
import numpy list1=[1,3,2,6,9] list2=numpy.mean(list1) print(list2) and 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 problem computer or what?
it looks numpy not installed on system. assuming have pip script installed python, can perform following command install it:
pip install numpy or
pip3.4 install numpy or, depending on distribution, might come package named python-numpy package manager.
Comments
Post a Comment