1
我試圖安裝chompack用pip在支持向量機算法中使用cvxopt。但它給了我一個錯誤,我沒有找到明確的答案。有一個related question但提供的答案是非常具體的人試圖安裝的軟件包。在我的情況下,沒有二進制包,我可以下載,甚至沒有文件。用pip安裝chompack失敗
特定錯誤似乎是
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2
這就是我在命令提示符(Windows 10 PC)和完整的結果類型。
pip install chompack
我得到
Collecting chompack
Using cached chompack-2.2.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): cvxopt>=1.1.7 in c:\python27\lib\site-packages (from chompack)
Building wheels for collected packages: chompack
Running setup.py bdist_wheel for chompack ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\my_username\\appdata\\local\\temp\\pip-build-o8y8d4\\chompack\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d c:\users\my_username\appdata\local\temp\tmpv64_u4pip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --python-tag not recognized
----------------------------------------
Failed building wheel for chompack
Running setup.py clean for chompack
Failed to build chompack
Installing collected packages: chompack
Running setup.py install for chompack ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\my_username\\appdata\\local\\temp\\pip-build-o8y8d4\\chompack\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\my_username\appdata\local\temp\pip-fkqebc-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\chompack
copying src\python\base.py -> build\lib.win32-2.7\chompack
copying src\python\conversion.py -> build\lib.win32-2.7\chompack
copying src\python\maxchord.py -> build\lib.win32-2.7\chompack
copying src\python\mcs.py -> build\lib.win32-2.7\chompack
copying src\python\misc.py -> build\lib.win32-2.7\chompack
copying src\python\pfcholesky.py -> build\lib.win32-2.7\chompack
copying src\python\symbolic.py -> build\lib.win32-2.7\chompack
copying src\python\__init__.py -> build\lib.win32-2.7\chompack
creating build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\cholesky.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\completion.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\edmcompletion.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\hessian.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\llt.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\plot.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\projected_inverse.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\psdcompletion.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\trmm.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\trsm.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\__init__.py -> build\lib.win32-2.7\chompack\pybase
running build_ext
building 'cbase' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\src
creating build\temp.win32-2.7\Release\src\C
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tcsrc/C\cbase.c /Fobuild\temp.win32-2.7\Release\src/C\cbase.obj
cbase.c
c:\users\my_username\appdata\local\temp\pip-build-o8y8d4\chompack\src\c\cvxopt.h(31) : fatal error C1083: Cannot open include file: 'complex.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\my_username\\appdata\\local\\temp\\pip-build-o8y8d4\\chompack\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\my_username\appdata\local\temp\pip-fkqebc-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\my_username\appdata\local\temp\pip-build-o8y8d4\chompack
我得到了這個完全相同的問題,在我的情況下,它沒有安裝chompack。那麼,你是如何解決你的情況的。你能幫忙嗎? – Creator