Failed with pip install chompack
Question: I'm trying to install chompack with pip to use in a Support Vector Machine
algorithm with cvxopt. However it gives me an error for which I haven't found
a clear answer. There is a [related
question](http://stackoverflow.com/q/12511815/2297475) 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.

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.

    
    
    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
    


Answer: I do not know the precise reason but you should use python itself to install
packages as `chompack`:

    
    
    python -m pip install chompack
    

For further informations read the manual:
<https://docs.python.org/3/installing/>

PS: I have seen the same message but it installed it anyway.

