old sklearn version in Jupyter Notebook

两盒软妹~` 提交于 2019-12-18 09:44:13

问题


I update sklearn version by terminal with

conda install scikit-learn=0.18

if I list with conda list scikit-learn

# packages in environment at /Users/Claudia/anaconda:
scikit-learn              0.18.1              np111py27_1
scikit-learn              0.18.1                    <pip>

but if I run in notebook

print('The scikit-learn version is {}.'.format(sklearn.__version__))

the result is

The scikit-learn version is 0.17.1.

How can I solve and update also the version in Jupyter Notebook?


回答1:


to update the version used by Jupyter you need to open terminal by Jupiter interface

and run command from here

 conda update scikit-learn

the mistake was the use of the system terminal.




回答2:


I solved this by python -m pip install scikit-learn --upgrade
check Python loading old version of sklearn



来源:https://stackoverflow.com/questions/41768292/old-sklearn-version-in-jupyter-notebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!