【问题标题】:Python fancyimpute installs on Mac, but not on WindowsPython fancyimpute 安装在 Mac 上,但不在 Windows 上
【发布时间】:2018-04-18 19:44:37
【问题描述】:

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

当我们 Windows 用户尝试执行相同操作时,我们会收到以下错误: “错误:需要 Microsoft Visual C++ 14.0。使用“Microsoft Visual C++ 构建工具”获取它:http://landinghub.visualstudio.com/visual-cpp-build-tools

我们已经安装了“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 机器所有者来说,这可能是一个绝望的案例吗?或者有什么解决办法?

【问题讨论】:

  • 什么是python版本?

标签: python compiler-errors pip installation fancyimpute


【解决方案1】:

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

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

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

【讨论】:

    【解决方案2】:

    我刚刚在 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
    

    【讨论】:

    • 我描述的问题发生在我们在 Anaconda 控制台中运行 pip install 命令时。我又试了一次-同样的问题。注意 - 我不是唯一一个,我们三个人,使用不同的 Windows 笔记本电脑都遇到了这个问题。
    • 我也刚刚尝试在 Windows 控制台中运行 pip install fancyimpute,但出现错误: pip : The term 'pip' is not known as the name of a cmdlet, function, script file, or operable程序。检查名称的拼写,如果包含路径,请验证路径是否正确并重试。
    • 你在用python2.7吗?如果您在命令提示符下运行python,那么它会被识别吗?
    • 我们使用的是 Anaconda 安装的 Python 3.6.1。当我在 Windows PowerShell 中只运行“python”时,我得到:以下输出:“Python 3.6.1 |Anaconda custom (64-bit)| (默认,2017 年 5 月 11 日,13:25:24)[MSC v.1900 64 位 (AMD64)] on win32'
    猜你喜欢
    • 2020-04-11
    • 2017-06-26
    • 2017-03-16
    • 2016-12-19
    • 2021-11-15
    • 2021-04-14
    • 2013-07-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多