Shorya Sharma
Shorya Sharma

Reputation: 457

Problem in importing python libraries in the command prompt

I am trying to write a simple program that uses the numpy module. I have downloaded it without the use of a virtual environment using pip. On doing a pip freeze all the modules are present yet I am unable to import it when I use the command prompt python terminal. I found a few answers related to the environment variables but I can't work my way around it.

Here is the pip freeze modules

Here is the no module error

Upvotes: 0

Views: 36

Answers (1)

Michael
Michael

Reputation: 737

That can be caused by multiple python versions installed in your system. So try:

python -m pip list

and if it does not list numpy, try installing it using:

python -m pip install numpy

In some cases, py works the same as python, so try all above things with py as well, including your own attempts

Upvotes: 2

Related Questions