[英]Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: …
I have two python 3 locations. 我有两个python 3位置。 One is located here, 一个在这里
"C:\\Users\\Ryano\\AppData\\Local\\Programs\\Python\\Python37-32" “ C:\\ Users \\ Ryano \\ AppData \\ Local \\ Programs \\ Python \\ Python37-32”
The other is related to Anaconda3 here, 另一个与这里的Anaconda3有关,
"C:\\Users\\Ryano\\Anaconda3" “ C:\\ Users \\ Ryano \\ Anaconda3”
I want run a .py file that uses the numpy package in the command prompt using the Anaconda3 python version. 我想使用Anaconda3 python版本在命令提示符下运行一个使用numpy包的.py文件。 I go to import numpy and it doesn't recognize it: 我去导入numpy,但它无法识别它:
C:\\Users\\Ryano\\Anaconda3>python C:\\ Users \\ Ryano \\ Anaconda3> python
Python 3.7.1 (default, Oct 28 2018, 08:39:03) [MSC v.1912 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information. Python 3.7.1(默认值,2018年10月28日,08:39:03)[MSC v.1912 64位(AMD64)] ::在Win32上的Anaconda,Inc.键入“帮助”,“版权”,“信用”或“许可证”以获取更多信息。
import numpy 导入numpy
Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'numpy' 追溯(最近一次呼叫最近):ModuleNotFoundError中的文件“”,第1行:没有名为“ numpy”的模块
So I go to install the numpy package to the Anaconda 3 version python and this error pops up: 因此,我将numpy软件包安装到Anaconda 3版本的python中,并弹出此错误:
C:\\Users\\Ryano\\Anaconda3\\Scripts>pip install numpy C:\\ Users \\ Ryano \\ Anaconda3 \\ Scripts> pip install numpy
Collecting numpy Using cached https://files.pythonhosted.org/packages/00/0e/5a8c34adb97fc1cd6636d78050e575945e874c8516d501421d5a0f377a6c/numpy-1.15.4-cp37-none-win_amd64.whl Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'c:\\users\\ryano\\anaconda3\\lib\\site-packages\\html5lib-1.0.1.dist-info\\METADATA' 使用缓存的https://files.pythonhosted.org/packages/00/0e/5a8c34adb97fc1cd6636d78050e575945e874c8516d501421d5a0f377a6c/numpy-1.15.4-cp37-none-win_amd64.whl由于环境错误,无法安装软件包:[Erno]文件或目录:“ c:\\ users \\ ryano \\ anaconda3 \\ lib \\ site-packages \\ html5lib-1.0.1.dist-info \\ METADATA”
Looking at the other posts similar to this one I could not find any solution that worked for my computer. 查看与此类似的其他文章,我找不到适用于我的计算机的任何解决方案。 Essentially I'm having issues with installing using pip. 本质上,我在使用pip安装时遇到问题。
重新安装html5lib
与conda
:
conda install html5lib
There can be issues with using multiple installations on Windows. 在Windows上使用多个安装可能会出现问题。
Please check the answer to this question: what is the process of installing and working with PIL - Python Imaging Library ? 请检查以下问题的答案: PIL-Python Imaging Library的安装和使用过程是什么?
Hopefully one of the questions will fix the issue. 希望其中一个问题可以解决此问题。 If not, let me know. 如果没有,请告诉我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.