让PyCharm导入sklearn [英] Getting PyCharm to import sklearn
问题描述
初学者在这里.
我正在尝试在pycharm
中使用sklearn
.导入sklearn
时,出现错误消息导入错误:没有名为sklearn
的模块"
pycharm
中的项目解释器设置为2.7.10(/anaconda/bin/python.app),应该是正确的.
在默认的preferenes,项目解释器下,我看到了所有的anacondas
软件包.我双击并安装了软件包scikit learn
和sklearn
.我仍然收到导入错误:没有名为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屋!