我已经能够在我的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...
我也尝试使用命令行来安装它,但是我也没有成功。任何帮助,将不胜感激。谢谢!
答案 0 :(得分:1)
要使scikit-learn / sklearn或任何其他软件包在pycharm中工作,为pycharm配置的python解释器必须找到那些已安装的软件包和其他依赖项。
给定示例中的特定错误可能是由于缺少开发工具,例如gcc
和make
。在安装软件包之前,请尝试运行以下命令(假设它是ubuntu linux)-
sudo apt-get install build-essential
有关其他发行版,请参见here
此外,您还可以安装pycharm python解释器可以从设置中找到的软件包。