No module named 'numpy'
Actually I am shifting from Windows to Linux. Using pycharm on Windows I have a python 3 script that requires numpy and matplotlib to run, so I installed them on my Linux system using
sudo apt-get install python3-numpy
sudo apt-get install matplotlib3-numpy
But still when I try to run the script I get error:
from python3-numpy import *
^
SyntaxError: invalid syntax
or:
from numpy import *
ImportError: No module named 'numpy'
You need to install numpy using pip
install pip :
sudo apt-get install python-pip python3-pip
Then install numpy using pip
sudo pip3 install -U numpy
Are you sure that you run python3 and not just python, which defaults to python2.7 on most systems.
You can get the Version of python with
python --version
or
python3 --version