simple-neural-network icon indicating copy to clipboard operation
simple-neural-network copied to clipboard

No module named numpy

Open KhalilKhalaf opened this issue 8 years ago • 2 comments

I am trying python and this for the first time. I installed python 2.7 and when I run the command "python main.py" I get "No module name NumPy" error

KhalilKhalaf avatar Dec 29 '16 21:12 KhalilKhalaf

In general, when programming in Python, if you get the error message "No module named X" you can solve it by going to your Terminal and typing the command: "sudo pip install X". Sudo means 'run this command with administrator privileges'. And pip is the Python package manager which allows you to install Python libraries.

If you are learning Python, I would recommend learning about pip here:

https://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/

So in answer to your specific question, the problem is main.py requires a third-party module called Numpy, which is not installed on your computer. You can solve this by going to your Terminal and typing "sudo pip install numpy" and this will fix the problem.

miloharper avatar Mar 17 '17 16:03 miloharper

I am getting the error module 'numpy' has no attribute 'array'. I am using python 3.6 . Thankyou.

Amri95 avatar Oct 14 '18 08:10 Amri95