3

我正在尝试在 anaconda py3.6 上安装 Fancyimpute,win 10、64 位。收到以下错误。

Collecting fancyimpute
Requirement already satisfied: downhill in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: numpy>=1.10 in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: scikit-learn>=0.17.1 in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: theano in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: scipy in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: climate in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: knnimpute in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: six in c:\anaconda3\lib\site-packages (from fancyimpute)
Collecting cvxpy (from fancyimpute)
  Using cached cvxpy-0.4.10-py3-none-any.whl
Requirement already satisfied: click in c:\anaconda3\lib\site-packages (from downhill->fancyimpute)
Requirement already satisfied: plac in c:\anaconda3\lib\site-packages (from climate->fancyimpute)
Requirement already satisfied: scs>=1.1.3 in c:\anaconda3\lib\site-packages (from cvxpy->fancyimpute)
Requirement already satisfied: fastcache in c:\anaconda3\lib\site-packages (from cvxpy->fancyimpute)
Requirement already satisfied: CVXcanon>=0.0.22 in c:\anaconda3\lib\site-packages (from cvxpy->fancyimpute)
Requirement already satisfied: toolz in c:\anaconda3\lib\site-packages (from cvxpy->fancyimpute)
Collecting ecos>=2 (from cvxpy->fancyimpute)
  Using cached ecos-2.0.4.tar.gz
Requirement already satisfied: multiprocess in c:\anaconda3\lib\site-packages (from cvxpy->fancyimpute)
Requirement already satisfied: dill>=0.2.6 in c:\anaconda3\lib\site-packages (from multiprocess->cvxpy->fancyimpute)
Building wheels for collected packages: ecos
  Running setup.py bdist_wheel for ecos: started
  Running setup.py bdist_wheel for ecos: finished with status 'error'
  Complete output from command C:\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-build-99u1p4_i\\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\Akshay\AppData\Local\Temp\tmpdmxhbqacpip-wheel- --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 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /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.10240.0\ucrt\math.h(78): 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.10240.0\ucrt\math.h(263): note: see previous definition of 'isinf'
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /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.10240.0\ucrt\math.h(78): 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.10240.0\ucrt\math.h(82): 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 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /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.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
  c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
  C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
  c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /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.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
  c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
  C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
  c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /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.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
  c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
  C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
  c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\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 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

  ----------------------------------------
  Running setup.py clean for ecos
Failed to build ecos
Installing collected packages: ecos, cvxpy, fancyimpute
  Running setup.py install for ecos: started
    Running setup.py install for ecos: finished with status 'error'
    Complete output from command C:\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-build-99u1p4_i\\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\Akshay\AppData\Local\Temp\pip-mgnxokqc-record\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 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /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.10240.0\ucrt\math.h(78): 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.10240.0\ucrt\math.h(263): note: see previous definition of 'isinf'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /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.10240.0\ucrt\math.h(78): 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.10240.0\ucrt\math.h(82): 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 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /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.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
    c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
    c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /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.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
    c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
    c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /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.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
    c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
    c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\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 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
  Failed building wheel for ecos
Command "C:\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-build-99u1p4_i\\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\Akshay\AppData\Local\Temp\pip-mgnxokqc-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Akshay\AppData\Local\Temp\pip-build-99u1p4_i\ecos\

该错误与以下内容有关 - 未能为 ecos 构建轮子

最初它向我显示了 Visual Studio C++ 的错误,在安装 VS 2015 C++ Build Tools 后它仍然给出了类似的错误,但这次是由于其他原因。我一直无法找到解决此问题的方法。将感谢一些帮助。

提前致谢!

4

1 回答 1

7

遇到同样的问题(ecos 2.0.4)并遇到了这个线程:ecos python issue

通过手动下载相应的 .whl 文件(Python 版本和 Windows 架构)解决了该问题:Windows 二进制文件

导航到下载的文件(在终端中)并运行pip install filename.whl.

于 2017-08-11T10:58:09.983 回答