cvxpy/ecos pip installation error

匿名 (未验证) 提交于 2019-12-03 01:10:02

问题:

This is a borderline SuperUser question. I've been using pip install <x> to add packages to my 3.6.2 installation, from powershell on Windows 10. I'm struggling to install CVXPY. Specifically, I've already upgraded setuptools and installed visual studio c++ 14. Also, I installed C++ 2008 as suggested by a github user: https://github.com/embotech/ecos/issues/53. But, I couldn't implement her other suggestion (edit ecosmodules.c) because I dont think that file exists in the raw package I downloaded from github

Below is the traceback when I try to install a key dependency, eCos, via pip install ecos.

 Collecting ecos   Using cached https://files.pythonhosted.org/packages/b6/b4/988b15513b13e8ea2eac65e97d84221ac515a735a93f046e2a2a3d7863fc/ecos-2.0.5.tar.gz Requirement already satisfied: numpy>=1.6 in c:\python36\lib\site-packages (from ecos) (1.14.2) Requirement already satisfied: scipy>=0.9 in c:\python36\lib\site-packages (from ecos) (1.1.0) Building wheels for collected packages: ecos   Running setup.py bdist_wheel for ecos ... error   Complete output from command c:\python36\python3.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tpittman\\AppData\\Local\\Temp\\pip-install-6n1cuqcw\\ecos\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\tpittman\AppData\Local\Temp\pip-wheel-cz4uosgf --python-tag cp36:   running bdist_wheel   running build   running build_py   creating build   creating build\lib.win-amd64-3.6   copying src\ecos.py -> build\lib.win-amd64-3.6   running build_ext   building '_ecos' extension   creating build\temp.win-amd64-3.6   creating build\temp.win-amd64-3.6\Release   creating build\temp.win-amd64-3.6\Release\src   creating build\temp.win-amd64-3.6\Release\ecos   creating build\temp.win-amd64-3.6\Release\ecos\external   creating build\temp.win-amd64-3.6\Release\ecos\external\ldl   creating build\temp.win-amd64-3.6\Release\ecos\external\ldl\src   creating build\temp.win-amd64-3.6\Release\ecos\src   creating build\temp.win-amd64-3.6\Release\ecos\external\amd   creating build\temp.win-amd64-3.6\Release\ecos\external\amd\src   creating build\temp.win-amd64-3.6\Release\ecos\ecos_bb   C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -Ic:\python36\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcsrc/ecosmodule.c /Fobuild\temp.win-amd64-3.6\Release\src/ecosmodule.obj   ecosmodule.c   ecos/include\ecos_bb.h(72): warning C4005: 'INFINITY': macro redefinition   C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(90): note: see previous definition of 'INFINITY'   ecos/include\ecos_bb.h(74): warning C4005: 'isinf': macro redefinition   C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(275): note: see previous definition of 'isinf'   C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -Ic:\python36\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcecos/external/ldl/src/ldl.c /Fobuild\temp.win-amd64-3.6\Release\ecos/external/ldl/src/ldl.obj   ldl.c   C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(90): warning C4005: 'INFINITY': macro redefinition   ecos/external/SuiteSparse_config\../../include/glblopts.h(58): note: see previous definition of 'INFINITY'   C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(94): warning C4005: 'NAN': macro redefinition   ecos/external/SuiteSparse_config\../../include/glblopts.h(53): note: see previous definition of 'NAN'   C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -Ic:\python36\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcecos/src/cone.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/cone.obj   cone.c   C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(90): warning C4005: 'INFINITY': macro redefinition   c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'   C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(94): warning C4005: 'NAN': macro redefinition   c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'   C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -Ic:\python36\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcecos/src/ctrlc.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/ctrlc.obj   ctrlc.c   C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(90): warning C4005: 'INFINITY': macro redefinition   c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'   C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(94): warning C4005: 'NAN': macro redefinition   c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'   C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -Ic:\python36\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcecos/src/ecos.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/ecos.obj   ecos.c   C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(90): warning C4005: 'INFINITY': macro redefinition   c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'   C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(94): warning C4005: 'NAN': macro redefinition   c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'   ecos/src/ecos.c(1093): warning C4013: '_set_output_format' undefined; assuming extern returning int   ecos/src/ecos.c(1093): error C2065: '_TWO_DIGIT_EXPONENT': undeclared identifier   error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX64\\x64\\cl.exe' failed with exit status 2    ----------------------------------------   Failed building wheel for ecos   Running setup.py clean for ecos Failed to build ecos Installing collected packages: ecos   Running setup.py install for ecos ... error     Complete output from command c:\python36\python3.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tpittman\\AppData\\Local\\Temp\\pip-install-6n1cuqcw\\ecos\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\tpittman\AppData\Local\Temp\pip-record-ngyh01oq\install-record.txt --single-version-externally-managed --compile:     running install     running build     running build_py     creating build     creating build\lib.win-amd64-3.6     copying src\ecos.py -> build\lib.win-amd64-3.6     running build_ext     building '_ecos' extension     creating build\temp.win-amd64-3.6     creating build\temp.win-amd64-3.6\Release     creating build\temp.win-amd64-3.6\Release\src     creating build\temp.win-amd64-3.6\Release\ecos     creating build\temp.win-amd64-3.6\Release\ecos\external     creating build\temp.win-amd64-3.6\Release\ecos\external\ldl     creating build\temp.win-amd64-3.6\Release\ecos\external\ldl\src     creating build\temp.win-amd64-3.6\Release\ecos\src     creating build\temp.win-amd64-3.6\Release\ecos\external\amd     creating build\temp.win-amd64-3.6\Release\ecos\external\amd\src     creating build\temp.win-amd64-3.6\Release\ecos\ecos_bb     C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -Ic:\python36\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcsrc/ecosmodule.c /Fobuild\temp.win-amd64-3.6\Release\src/ecosmodule.obj     ecosmodule.c     ecos/include\ecos_bb.h(72): warning C4005: 'INFINITY': macro redefinition     C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(90): note: see previous definition of 'INFINITY'     ecos/include\ecos_bb.h(74): warning C4005: 'isinf': macro redefinition     C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(275): note: see previous definition of 'isinf'     C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -Ic:\python36\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcecos/external/ldl/src/ldl.c /Fobuild\temp.win-amd64-3.6\Release\ecos/external/ldl/src/ldl.obj     ldl.c     C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(90): warning C4005: 'INFINITY': macro redefinition     ecos/external/SuiteSparse_config\../../include/glblopts.h(58): note: see previous definition of 'INFINITY'     C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(94): warning C4005: 'NAN': macro redefinition     ecos/external/SuiteSparse_config\../../include/glblopts.h(53): note: see previous definition of 'NAN'     C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -Ic:\python36\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcecos/src/cone.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/cone.obj     cone.c     C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(90): warning C4005: 'INFINITY': macro redefinition     c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'     C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(94): warning C4005: 'NAN': macro redefinition     c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'     C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -Ic:\python36\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcecos/src/ctrlc.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/ctrlc.obj     ctrlc.c     C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(90): warning C4005: 'INFINITY': macro redefinition     c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'     C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(94): warning C4005: 'NAN': macro redefinition     c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'     C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -Ic:\python36\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcecos/src/ecos.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/ecos.obj     ecos.c     C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(90): warning C4005: 'INFINITY': macro redefinition     c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'     C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt_math.h(94): warning C4005: 'NAN': macro redefinition     c:\users\tpittman\appdata\local\temp\pip-install-6n1cuqcw\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'     ecos/src/ecos.c(1093): warning C4013: '_set_output_format' undefined; assuming extern returning int     ecos/src/ecos.c(1093): error C2065: '_TWO_DIGIT_EXPONENT': undeclared identifier     error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX64\\x64\\cl.exe' failed with exit status 2      ---------------------------------------- Command "c:\python36\python3.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tpittman\\AppData\\Local\\Temp\\pip-install-6n1cuqcw\\ecos\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\tpittman\AppData\Local\Temp\pip-record-ngyh01oq\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\tpittman\AppData\Local\Temp\pip-install-6n1cuqcw\ecos\ 

回答1:

On an Anaconda based Win64 Python36 installation a

conda install ecos 

worked for me.

Which than allowed a pip install cvxpy.



回答2:

I think the best "solution" is to use the windows linux subsystem. from here, I was able to install cvxpy and all dependencies on python 3.5 with python3 -m pip install cmake and python3 -m pip install cvxpy

For those who haven't installed the WLS, it's not trivial but relatively painless. https://docs.microsoft.com/en-us/windows/wsl/install-win10



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!