No module named numpy
Opened this issue · 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
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.
I am getting the error module 'numpy' has no attribute 'array'. I am using python 3.6 . Thankyou.