python安装依赖失败_python执行安装第三方依赖numpy失败:error: Unable to find vcvarsall.bat...
一臺計算機上同時安裝了python2.7和python3.7。
現在為python2.7安裝numpy包。
失敗:error: Unable to find vcvarsall.bat
=========================
下載安裝 Microsoft Visual C++ Compiler for Python 2.7
user installations are disabled via policy on the machine.
安裝之后:
C:\Users\Administrator\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat
仍然?error: Unable to find vcvarsall.bat
根據自己電腦的情況找到該目錄,然后在“python安裝路徑...\Lib\distutils目錄下有個msvc9compiler.py,找到msvc9compiler.py打開,在這個文件的219行定義了一個find_vcvarsall(version)函數,直接在函數里第一行加入如下內容:
vcvarsall = r"C:\Program Files (x86)\Microsoft Visual Studio\.....\vcvarsall.bat"
return vcvarsall
vcvarsall的值是你的vcvarsall.bat文件的具體路徑
隨后提示要安裝.net framework 3.5.? Python2是該淘汰了,太麻煩了。
————————————————
原文鏈接:https://blog.csdn.net/leaves_story/article/details/94655577
=========================
一般大型的安裝包都可以在這個網址下載到http://www.lfd.uci.edu/~gohlke/pythonlibs/,手動下載安裝包到本地,可能安裝成功的概率較大
安裝時出現找不到安裝包的錯誤Could not find a version that satisfies the requirement dateutil (from versions: )
No matching distribution found for dateutil
就可以到上述網址先下好安裝包,再用本地的安裝包安裝:pip install
總結
以上是生活随笔為你收集整理的python安装依赖失败_python执行安装第三方依赖numpy失败:error: Unable to find vcvarsall.bat...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python怎么使用自定义停用词_pyh
- 下一篇: g menu i meun_长沙话读“这