在python中安装垃圾邮件包时遇到了一些配置问题
我的Visual Studio的版本是14.0。我使msvc9compiler.py
文件中的代码的VERSION等于14.0,解决了找不到版本的问题;并添加了distutils.cfg
文件:[build] compiler=mingw32
解决了一些错误。现在我遇到了一个丢失的spams-tst.h
文件和gcc status 1 problem
,哭了...
D:\software\anaconda3\anzhuang_k\spams-2.6.1>python setup.py install
running install
running build
running build_py
running build_ext
building '_spams_wrap' extension
C compiler: gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes
compile options: '-DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x1900 -I. -Ispams\linalg -Ispams\prox -Ispams\decomp -Ispams\dictLearn -ID:\software\anaconda3\lib\site-packages\numpy\core\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -c'
extra options: '-DNDEBUG -DUSE_BLAS_LIB -fPIC -fopenmp -Wunused-variable -m64'
gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x1900 -I. -Ispams\linalg -Ispams\prox -Ispams\decomp -Ispams\dictLearn -ID:\software\anaconda3\lib\site-packages\numpy\core\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -c spams_wrap.cpp -o build\temp.win-amd64-3.6\Release\spams_wrap.o -DNDEBUG -DUSE_BLAS_LIB -fPIC -fopenmp -Wunused-variable -m64
cc1plus.exe: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
spams_wrap.cpp:1:0: warning: -fPIC ignored for target (all code is position independent)
/* ----------------------------------------------------------------------------
^
spams_wrap.cpp:3134:23: fatal error: spams-tst.h: No such file or directory
compilation terminated.
error: Command "gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x1900 -I. -Ispams\linalg -Ispams\prox -Ispams\decomp -Ispams\dictLearn -ID:\software\anaconda3\lib\site-packages\numpy\core\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -c spams_wrap.cpp -o build\temp.win-amd64-3.6\Release\spams_wrap.o -DNDEBUG -DUSE_BLAS_LIB -fPIC -fopenmp -Wunused-variable -m64" failed with exit status 1
D:\software\anaconda3\anzhuang_k\spams-2.6.1>
安装失败