如果在我的脚本中我有import sklearn
,我会得到ImportError: No module named sklearn
。
pip3 install sklearn
返回
Requirement already satisfied: sklearn in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
Requirement already satisfied: scikit-learn in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from sklearn)
我也可以在终端导入它:
Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn
>>> sklearn.__version__
'0.19.1'
当然,我已尝试卸载并重新安装numpy,scipy和scikit-learn。
还有什么?