简体   繁体   English

pip install chompack失败

[英]Failed with pip install chompack

I'm trying to install chompack with pip to use in a Support Vector Machine algorithm with cvxopt. 我正在尝试使用pip安装chompack,以在cvxopt的支持向量机算法中使用。 However it gives me an error for which I haven't found a clear answer. 但是,这给了我一个错误,但我没有找到明确的答案。 There is a related question but the answer provided is very specific to the package the person is trying to install. 有一个相关的问题,但是提供的答案非常特定于该人要安装的软件包。 In my case, there's no binary package that I can download or even a .whl file. 就我而言,没有二进制文件可以下载,甚至没有.whl文件。

The specific error seems to be 具体的错误似乎是

error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2

Here's what I typed in the command prompt (Windows 10 PC) and the full result. 这是我在命令提示符(Windows 10 PC)中键入的内容以及完整的结果。

pip install chompack

I get 我懂了

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

I do not know the precise reason but you should use python itself to install packages as chompack : 我不知道确切的原因,但您应该使用python本身将软件包安装为chompack

python -m pip install chompack

For further informations read the manual: https://docs.python.org/3/installing/ 有关更多信息,请阅读手册: https : //docs.python.org/3/installing/

PS: I have seen the same message but it installed it anyway. PS:我看到了相同的消息,但无论如何它都已安装了它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM