是否可以使用免费的 Microsoft C++ Compiler for Python 2.7构建二进制 conda python 包?
我在我的 Windows 7 机器上安装了编译器,但是当我尝试 conda build(例如来自https://github.com/ioos/conda-recipes/tree/master/pyproj的 conda build pyproj )时,我得到:
C:\Anaconda64\conda-bld\work\pyproj-1.9.3>set USERPROFILE=C:\Users\rsignell
C:\Anaconda64\conda-bld\work\pyproj-1.9.3>REM ===== end generated header =====
C:\Anaconda64\conda-bld\work\pyproj-1.9.3>"C:\Anaconda64\envs\_build\python.exe"
setup.py install
Traceback (most recent call last):
File "setup.py", line 14, in <module>
objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
File "C:\Anaconda64\envs\_build\lib\distutils\msvc9compiler.py", line 473, in
compile
self.initialize()
File "C:\Anaconda64\envs\_build\lib\distutils\msvc9compiler.py", line 383, in
initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Anaconda64\envs\_build\lib\distutils\msvc9compiler.py", line 271, in
query_vcvarsall
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat
C:\Anaconda64\conda-bld\work\pyproj-1.9.3>if errorlevel 1 exit 1
Command failed: C:\Windows\system32\cmd.exe /c bld.bat
我的康达信息是:
c:\Users\rsignell\Documents\GitHub\conda-recipes>conda info
Current conda install:
platform : win-64
conda version : 3.8.1
conda-build version : 1.10.0
python version : 2.7.8.final.0
requests version : 2.5.1
root environment : C:\Anaconda64 (writable)
default environment : C:\Anaconda64
envs directories : C:\Anaconda64\envs
package cache : C:\Anaconda64\pkgs
channel URLs : http://repo.continuum.io/pkgs/free/win-64/
http://repo.continuum.io/pkgs/pro/win-64/
config file : None
is foreign system : False