【问题标题】:Installing Scikit-learn in pycharm on Mac在 Mac 上的 pycharm 中安装 Scikit-learn
【发布时间】:2018-07-04 17:13:19
【问题描述】:

我已经能够让所有其他软件包在我的 PyCharm 环境中运行,但是当我尝试下载 sklearn 或 scikit-learn 时出现错误。错误开始如下:

Collecting scikit-learn
Using cached https://files.pythonhosted.org/packages/f5/2c/5edf2488897cad4fb8c4ace86369833552615bf264460ae4ef6e1f258982/scikit-learn-0.19.1.tar.gz
Building wheels for collected packages: scikit-learn
  Running setup.py bdist_wheel for scikit-learn: started
  Running setup.py bdist_wheel for scikit-learn: finished with status 'error'
  Complete output from command "/Users/.../PycharmProjects/StartingProject/VE Test/bin/python" -u -c "import setuptools, tokenize;__file__='/private/var/folders/h0/0p8xxjc12kdgydxx7hpky_yc0000gn/T/pycharm-packaging/scikit-learn/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 /private/var/folders/h0/0p8xxjc12kdgydxx7hpky_yc0000gn/T/pip-wheel-wy8d4dqc --python-tag cp37:
  Partial import of sklearn during the build process.
  blas_opt_info:
  blas_mkl_info:
  customize UnixCCompiler
    libraries mkl_rt not found in ['/Users/.../PycharmProjects/StartingProject/VE Test/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE...

我也尝试使用我的命令行来安装它,但我也没有找到成功。任何帮助,将不胜感激。谢谢!

【问题讨论】:

  • 我建议安装 Anaconda,我相信它会附带 scikit 和其他数据科学工具
  • 谢谢,我已经尝试过了,但我也在尝试使用 tensorflow,我无法在 anaconda 中正常工作,但我可以在 pycharm 中使用。因此,我正在尝试安装 scikit,但我永远无法同时安装它们。
  • Pycharm 只是指向 Conda 环境,“Pycharm 内”没有安装与“conda install”有任何不同

标签: python scikit-learn pycharm


【解决方案1】:

要让 scikit-learn/sklearn 或任何其他包在 pycharm 中工作,为 pycharm 配置的 python 解释器必须找到那些已安装的包和其他依赖项。

给定示例中的特定错误可能是由于缺少开发工具,例如 gccmake。在安装软件包之前尝试运行以下命令(假设它是 ubuntu linux)-

sudo apt-get install build-essential

对于其他发行版,请参阅here

另外,你还可以安装pycharm python解释器可以从设置中找到的包。

【讨论】:

    猜你喜欢
    • 2020-03-09
    • 2013-02-04
    • 2020-04-28
    • 2017-08-30
    • 2015-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-18
    相关资源
    最近更新 更多