【发布时间】:2015-12-26 10:04:50
【问题描述】:
注意: 我看到了多个答案都无济于事,所以请在显示为重复之前查看解决方案和我的失败解决方案列表。
嘿,
所以我得到了一台新计算机(旧 Windows w/Python 3.4),所以我在我的新计算机上安装了 Python 3.5。我开始安装模块,直到遇到这样的错误:
C:\Users\Samuel>pip install noise
Collecting noise
Using cached noise-1.2.2.tar.gz
Installing collected packages: noise
Running setup.py install for noise
Complete output from command "c:\program files\python 3.5\python.exe" -c "import setuptools, tokenize;__file__='C:\\Users\\Samuel\\AppData\\Local\\Temp\\pip-build-e9dlwpm2\\noise\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Samuel\AppData\Local\Temp\pip-7tgvnyfe-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\noise
copying perlin.py -> build\lib.win-amd64-3.5\noise
copying setup.py -> build\lib.win-amd64-3.5\noise
copying shader.py -> build\lib.win-amd64-3.5\noise
copying shader_noise.py -> build\lib.win-amd64-3.5\noise
copying test.py -> build\lib.win-amd64-3.5\noise
copying __init__.py -> build\lib.win-amd64-3.5\noise
running build_ext
building 'noise._simplex' extension
error: Unable to find vcvarsall.bat
----------------------------------------
Command ""c:\program files\python 3.5\python.exe" -c "import setuptools, tokenize;__file__='C:\\Users\\Samuel\\AppData\\Local\\Temp\\pip-build-e9dlwpm2\\noise\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Samuel\AppData\Local\Temp\pip-7tgvnyfe-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Samuel\AppData\Local\Temp\pip-build-e9dlwpm2\noise
我尝试使用easy_install 作为替代品,但随之而来的是 1) 拒绝访问错误(通过管理员权限克服)和 2) 无法找到 vcvarsall.bat
因此,我安装了 Visual Studio 2015 和 Visual C++ 2008。 没有区别。
我将vcvarsall.bat 的路径添加到了PATH。
没有区别。
我将vcvarsall.bat 的路径添加到VS100COMNTOOLS、VS140COMNTOOLS 和VS90COMNTOOLS。
没有区别。
再次运行 pip 和 easy_install 并获得管理员许可,穿着我的幸运袜。
没有区别。
按照 Stack Overflow 答案之一的建议安装并运行 Miniconda。 没有找到我需要的一个包。事实证明它无论如何都不是在寻找 PyPI。
我不知道如何解决这个问题。我需要恢复到 Python 3.4 吗?
规格
- Windows 10 x86 64 位
- Python 3.5
- 已安装 VS 2015、VC++ 2008
【问题讨论】:
标签: python-3.x pip easy-install