-1

I am getting import error: module named numpy. Does this mean i have to install numpy? I have downloaded the new version extracted it into home. I am not sure what else to do. I am using Ubuntu 16.04. I have also tried:

sudo apt-get install python-pip
sudo apt-get install python3-numpy

But the error remains. Can anyone kindly guide me how to solve this

  • Please post the exact error message, and how you import numpy. Also: what is the python version you are using in the script, and how are you exactly running (calling) the script? – Jacob Vlijm May 23 '17 at 05:54
  • 1
    are you sure that your program uses python3? You might need to install python-numpy with sudo apt-get install python-numpy if your program uses python2 instead. – sid-m May 23 '17 at 05:58

1 Answers1

1

Are you sure that you are not trying to import numpy for Python 3.x into a Python 2.x program? In Ubunto 20.04 and earlier open the terminal and type:

sudo apt install python-numpy  

If this works, it is the logical reverse of this answer.

karel
  • 114,770