简体   繁体   English

pip 在 windows 10 上安装 numpy 显示成功的结果,但没有 Z2EA9510C37F7F89E4941FF7 站点文件夹中的文件夹

[英]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.我有 python 3.7,需要安装 numpy。 I used pip install numpy.我使用 pip 安装 numpy。 Command line shows it is successful.命令行显示成功。 But when I go to the site-package folder.但是当我 go 到 site-package 文件夹时。 numpy is not there. numpy 不存在。 So import numpy will not work.所以import numpy将不起作用。

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? pip 是否有详细的 output?

For python 3 you need to use the command 'pip3' instead of 'pip'!!对于 python 3,您需要使用命令“pip3”而不是“pip”!!

Additional information: I think you need to configure your Python to look where your Modules are installed.附加信息:我认为您需要配置 Python 以查看模块的安装位置。

Here is where the module might be installed: C:\Users<installUser>\AppData\Local\Programs\Python\Python38\Lib这是可能安装模块的位置: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.您可以尝试将安装移动到新路径,更正您的“PATH”变量,然后再试一次。

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/这是一些文档的链接: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/我将这些用于带有 WSL 的 Ansible,我喜欢它们: https://realpython.com/courses/working-python-virtual-environments/

Enjoy!享受!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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