2

我是一个尝试安装 Python 的“fancyimpute”包的小团队的一员。我们三个人有不同的 Windows 机器。我们中的一个有 Mac。fancyimpute 的页面上写着:“操作系统 :: OS Independent”。我的队友在他的 Mac 上安装它没有任何问题:pip install fancyimpute可以正常工作。

当我们,Windows 用户尝试做同样的事情时,我们收到此错误:“错误:需要 Microsoft Visual C++ 14.0。使用“Microsoft Visual C++ 构建工具”获取它:http: //landinghub.visualstudio.com/visual -cpp-构建工具

一个我们已经安装了“Visual C++ 2015 Build Tools”,我们仍然无法安装fancyimpute。我们得到的错误如下:

'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

对于 Windows 机器所有者来说,这可能是一个绝望的案例吗?或者有解决办法吗?

4

2 回答 2

0

我刚刚在 Windows 10 机器上安装了 fancyimpute,它是成功的。如果您是从 pycharm 控制台执行的,请尝试从命令提示符运行 pip 命令。

C:\Users\USER>pip install fancyimpute
Collecting fancyimpute
  Downloading fancyimpute-0.2.0.tar.gz
Requirement already satisfied: six in c:\python27\lib\site-packages (from fancyimpute)
Collecting knnimpute (from fancyimpute)
  Downloading knnimpute-0.1.0.tar.gz
Requirement already satisfied: numpy>=1.10 in c:\python27\lib\site-packages (from fancyimpute)
Requirement already satisfied: scipy in c:\python27\lib\site-packages (from fancyimpute)
Collecting cvxpy (from fancyimpute)
  Downloading cvxpy-0.4.11-py2-none-any.whl (379kB)
    100% |################################| 389kB 439kB/s
Requirement already satisfied: scikit-learn>=0.17.1 in c:\python27\lib\site-packages (from fancyimpute)
Collecting downhill (from fancyimpute)
  Downloading downhill-0.4.0-py2.py3-none-any.whl
Collecting climate (from fancyimpute)
  Downloading climate-0.4.6.tar.gz
Collecting theano (from fancyimpute)
  Downloading Theano-0.9.0.tar.gz (3.1MB)
    100% |################################| 3.1MB 65kB/s
Collecting ecos>=2 (from cvxpy->fancyimpute)
  Downloading ecos-2.0.4-cp27-none-win32.whl (44kB)
    100% |################################| 51kB 96kB/s
Collecting CVXcanon>=0.0.22 (from cvxpy->fancyimpute)
  Downloading CVXcanon-0.1.1.tar.gz (694kB)
    100% |################################| 696kB 105kB/s
Requirement already satisfied: toolz in c:\python27\lib\site-packages (from cvxpy->fancyimpute)
Collecting fastcache (from cvxpy->fancyimpute)
  Downloading fastcache-1.0.2.tar.gz
Collecting multiprocess (from cvxpy->fancyimpute)
  Downloading multiprocess-0.70.5.zip (1.5MB)
    100% |################################| 1.5MB 73kB/s
Collecting scs>=1.1.3 (from cvxpy->fancyimpute)
  Downloading scs-1.2.7.tar.gz (280kB)
    100% |################################| 286kB 107kB/s
Requirement already satisfied: click in c:\python27\lib\site-packages (from downhill->fancyimpute)
Collecting plac (from climate->fancyimpute)
  Downloading plac-0.9.6-py2.py3-none-any.whl
Collecting dill>=0.2.6 (from multiprocess->cvxpy->fancyimpute)
  Downloading dill-0.2.7.1.tar.gz (64kB)
    100% |################################| 71kB 109kB/s
Collecting pyreadline>=1.7.1 (from dill>=0.2.6->multiprocess->cvxpy->fancyimpute)
  Downloading pyreadline-2.1.zip (109kB)
    100% |################################| 112kB 127kB/s
Building wheels for collected packages: fancyimpute, knnimpute, climate, theano, CVXcanon, fastcache, multiprocess, scs, dill, pyreadline
  Running setup.py bdist_wheel for fancyimpute ... done
  Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\46\9d\78\a49d65bb66557f705de636d1a21f9310993a4342670add3f9e
  Running setup.py bdist_wheel for knnimpute ... done
  Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\66\a0\1c\ed41cf540d0bd6d4ae368e9554b77753da154e7d8974c4435f
  Running setup.py bdist_wheel for climate ... done
  Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\90\1f\17\51ca46dd7c3b0be854c63468b50b3d24c443d149244cc4bb19
  Running setup.py bdist_wheel for theano ... done
  Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\d5\5b\93\433299b86e3e9b25f0f600e4e4ebf18e38eb7534ea518eba13
  Running setup.py bdist_wheel for CVXcanon ... done
  Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\1b\f6\dd\14f66c64621bddd6b92a3cfc995fa2a21b134fcf4122402b30
  Running setup.py bdist_wheel for fastcache ... done
  Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\1b\ce\51\0614c8aaab5c0893ed5a2098a15673a4949cba59cfa04ceace
  Running setup.py bdist_wheel for multiprocess ... done
  Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\28\ef\9f\5cc70b5d92fc4641b68dc23b3583f2b6ec1d153cb71985aeaf
  Running setup.py bdist_wheel for scs ... done
  Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\de\bb\5c\5efaf95dbe8b2a87650a9a1061aeefcd5b16353b98afbac789
  Running setup.py bdist_wheel for dill ... done
  Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\e5\88\fe\7e290ce5bb39d531eb9bee5cf254ba1c3e3c7ba3339ce67bee
  Running setup.py bdist_wheel for pyreadline ... done
  Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\9a\c7\45\fd424eb3d7875d7a61221accd593e17c7953ed5ece5ee60be9
Successfully built fancyimpute knnimpute climate theano CVXcanon fastcache multiprocess scs dill pyreadline
Installing collected packages: knnimpute, ecos, CVXcanon, fastcache, pyreadline, dill, multiprocess, scs, cvxpy, theano, downhill, plac, climate, fancyimpute
Successfully installed CVXcanon-0.1.1 climate-0.4.6 cvxpy-0.4.11 dill-0.2.7.1 downhill-0.4.0 ecos-2.0.4 fancyimpute-0.2.0 fastcache-1.0.2 knnimpute-0.1.0 multiprocess-0.70.5 plac-0.9.6 pyreadline-2.1 scs-1.2.7 theano-0.9.0
于 2017-11-06T15:43:41.643 回答
0

我在这里找到了解决方案:Fancyimpute pip install error

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

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

于 2017-11-07T01:27:35.090 回答