I'm using Ubuntu 18.04.2 LTS and i have python 3.6 version and python3-numpy is also installed and the version is 1.13.3 but still while using some programs i'm getting following error Traceback (most recent call last): File "setup.py", line 2, in import numpy ModuleNotFoundError: No module named 'numpy'

I have tried updating and reinstalling the python3-numpy and all the other ways to rectify this issue. what should i do ? please help !!

  • 1
    Can you be more specific than "using some programs"? Perhaps they use python2 not python3? Jul 11, 2019 at 10:38

2 Answers 2


Restart your computer. If you installed numpy with pip install numpy , it installed on your default python version. Try to execute it with python3


You have installed the python3-numpy package from the default Ubuntu 18.04 repositories. Enter into command mode with the -c option of python3 to check if you can indeed import numpy in python3.

python3 -c "import numpy"

Another way of making sure that you are running python3 is to start the python3 interpreter using the command python3 and then run import numpy from the python3 prompt.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.