让PyCharm导入sklearn [英] Getting PyCharm to import sklearn

查看:1963
本文介绍了让PyCharm导入sklearn的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

初学者在这里.

我正在尝试在pycharm中使用sklearn.导入sklearn时,出现错误消息导入错误:没有名为sklearn的模块" pycharm中的项目解释器设置为2.7.10(/anaconda/bin/python.app),应该是正确的. 在默认的preferenes,项目解释器下,我看到了所有的anacondas软件包.我双击并安装了软件包scikit learnsklearn.我仍然收到导入错误:没有名为sklearn的模块"

I’m trying to use sklearn in pycharm. When importing sklearn I get an error that reads "Import error: No module named sklearn" The project interpreter in pycharm is set to 2.7.10 (/anaconda/bin/python.app), which should be the right one. Under default preferenes, project interpreter, I see all of anacondas packages. I've double clicked and installed the packages scikit learn and sklearn. I still receive the "Import error: No module named sklearn"

有人知道如何解决这个问题吗?

Does anyone know how to solve this problem?

推荐答案

要确保在PyCharm IDE上安装了Scikit-learn软件包,请转至文件"菜单>设置",然后搜索解释器".选择项目解释器",如果您在软件包列表中没有看到Scikit-learn,请单击右端的+号.它为我们带来了另一个带有搜索栏的窗口,您可以在其中键入"Scikit-learn"并进行安装(请参见屏幕截图).我希望这有帮助.

To make sure you have Scikit-learn package installed on your PyCharm IDE, go to File Menu>Settings and search for Interpreter. Select Project Interpreter, and if you dont see Scikit-learn in the list of packages, click the + sign on the right end. It brings us another window with a search bar, where you can type 'Scikit-learn' and install (see screenshots). I hope this helps.

屏幕截图: ,

这篇关于让PyCharm导入sklearn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆