【问题标题】:failed error 1 code with intalling scipy and sckit安装 scipy 和 scikit 失败的错误 1 ​​代码
【发布时间】:2016-07-28 22:51:53
【问题描述】:

每次我尝试使用pip3 安装某些软件包时,例如sklearnscipy,我都会不断收到错误消息:

命令“/usr/local/bin/python3.5 -c”导入设置工具, tokenize;file='/tmp/pip-build-379iloop/scikit-learn/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" 安装 --record /tmp/pip-2bvcjei9-record/install-record.txt --single-version-externally-managed --compile" 在 /tmp/pip-build-379iloop/scikit-learn 中失败,错误代码为 1

我尝试将anaconda3 用于软件包,但我只能将pip 用于2.7 软件包的安装,而不能用于3.5。有什么猜测吗?

【问题讨论】:

    标签: python numpy scipy scikit-learn


    【解决方案1】:

    如果我们能看到在那之前打印的 pip,那可能有助于缩小发生的范围。

    没有看到命令究竟是如何失败的(即除了“错误代码 1”),我猜你没有安装 BLAS 和/或 LAPACK。我确定这是这里已经存在的一些问题的重复,因为当我遇到这个问题时,我就是这样发现它的,但我似乎找不到它。

    如果您使用的是 Ubuntu,则可以使用

    下载 BLAS
    sudo apt-get install libopenblas-dev 
    

    和 LAPACK 搭配

    sudo apt-get install liblapack-dev
    

    您可能还需要软件包 g++gfortranpython3-dev,在 Ubuntu 上也可以使用 apt-get。我确信这些软件包也适用于您使用的任何发行版/操作系统。

    【讨论】:

    • 成功了,谢谢!是的,在使用您提到的确切缺少的文件名查找错误后,您是对的,之前已回答但感谢您仍然为我回答,我很感激!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-10-07
    • 2018-08-27
    • 1970-01-01
    • 2018-12-29
    • 1970-01-01
    • 2014-05-17
    • 2020-01-20
    相关资源
    最近更新 更多