pip - 无法找到vcvarsall.bat

时间:2016-05-23 06:02:41

标签: python windows visual-c++

从上周开始,我试图解决此问题,但无法修复此错误。虽然,我试图安装,出现以下错误:

C:\Users\#######>pip install pyproj
Collecting pyproj
  Using cached pyproj-1.9.5.1.tar.gz
    Complete output from command python setup.py egg_info:
    using bundled proj4..
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\H~1\AppData\Local\Temp\pip-build-e4o66o1z\pyproj\setup.py", line 72, in <module>
        objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
      File "C:\Users\######\Anaconda3\lib\distutils\_msvccompiler.py", line 317, in compile
        self.initialize()
      File "C:\Users\########\Anaconda3\lib\distutils\_msvccompiler.py", line 210, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "C:\Users\#######\Anaconda3\lib\distutils\_msvccompiler.py", line 85, in _get_vc_env
        raise DistutilsPlatformError("Unable to find vcvarsall.bat")
    distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\H~1\AppData\Local\Temp\pip-build-e4o66o1z\pyproj\

如果不修复此错误,我无法继续。我已经安装了Microsoft Visual C ++。

1 个答案:

答案 0 :(得分:1)

在Windows下安装一些Python包可能很麻烦。您可以在

找到预编译的包

http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyproj

只需下载适合您的Python版本的.whl文件,然后使用

进行安装
pip install <filename>.whl