简体   繁体   中英

pip install numpy on windows 10 showed successful result, but no numpy is in site-package folder

I have python 3.7 and need to install numpy. I used pip install numpy. Command line shows it is successful. But when I go to the site-package folder. numpy is not there. So import numpy will not work.

C:\WINDOWS\system32>python -m pip install numpy
Collecting numpy
  Using cached numpy-1.20.3-cp37-cp37m-win_amd64.whl (13.6 MB)
Installing collected packages: numpy
Successfully installed numpy-1.20.3

What could be causing this issue? Is there an verbose output for pip?

For python 3 you need to use the command 'pip3' instead of 'pip'!!

Additional information: I think you need to configure your Python to look where your Modules are installed.

Here is where the module might be installed: C:\Users<installUser>\AppData\Local\Programs\Python\Python38\Lib

You may try moving the install to a new path, correcting your 'PATH' variable, and try it again.

To summarize, it could be permissions, could be the install location...

Here is a link to some documentation:https://realpython.com/lessons/why-cant-python-find-my-modules/

Here is a link to Virtual Environment setups. The doc above mentions this as a possible solution. I use these for Ansible with WSL, and I love them: https://realpython.com/courses/working-python-virtual-environments/

Enjoy!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM