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,230 points
35,084 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,440 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,910 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,520 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
16,872 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,880 points
12,332 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
2,224 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,720 points
6,562 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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,007 views
0 votes
1 answer
+5 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,790 points
3,386 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,440 points
12,708 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP