import NumPy as np ImportError No module named NumPy

0 votes

Hi Guys,

I have NumPy installed in my computer. But still I am getting this below error.

import NumPy as np ImportError: No module named NumPy

What should I do?

Apr 9, 2020 in Python by akhtar
• 38,180 points
20,002 views

3 answers to this question.

0 votes

Hi@akhtar,

Whenever you import a module, python will search for that module in some specific directories. To know which all directories it will search, use the below given code in python promp

$ import sys
$ print(sys.path)

And also make sure that the NumPy module resides in any of those directory.

If your NumPy module does not present in any of those directory, then add your NumPy module to the python search path by the following given code in python prompt.

​$ import sys
$ sys.path.append("NumPy_path")
$ import NumPy

Hope this will solve your error.

answered Apr 9, 2020 by MD
• 95,140 points
0 votes

Support for Python 3 was added in NumPy version 1.5.0, so to begin with, you must download/install a newer version of NumPy.

answered Dec 16, 2020 by Gitika
• 65,870 points
0 votes

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
answered Dec 16, 2020 by Roshni
• 10,420 points

Related Questions In Python

0 votes
2 answers

Python error " import requests ImportError: No module named requests"

Hello, Open Cmd or Powershell as Admin. type pip ...READ MORE

answered Nov 28, 2020 in Python by Rohan
• 200 points
11,888 views
0 votes
1 answer

Import Error: No module named numpy?

Hello, I had numpy installed on the same ...READ MORE

answered Apr 14, 2020 in Python by Niroj
• 82,680 points
9,113 views
0 votes
1 answer

ImportError: No module named requests

Requests is not available for use by ...READ MORE

answered Jun 26, 2018 in Python by Hamartia's Mask
• 1,580 points
1,546 views
+3 votes
1 answer

Tensorflow 1.5 ImportError: No module named tensorflow.python.client

I think it's a bug in Tensorflow ...READ MORE

answered Sep 25, 2018 in Python by charlie_brown
• 7,780 points
5,763 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,979 views
0 votes
0 answers
+4 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,810 points
1,518 views
0 votes
1 answer

how to solve the error : "ImportError: No module named Tkinter" in python.

Hi@Umama, If you are using Linux system, then ...READ MORE

answered Apr 27, 2020 in Python by MD
• 95,140 points
9,160 views
0 votes
1 answer