Python loading old version of sklearn

时光毁灭记忆、已成空白 提交于 2019-12-05 16:16:43

Check your python path. On unix:

echo $PYTHONPATH

This will output all paths used for module imports. You might have some old version installed elsewhere.

You have to make sure that the pip you are invoking is the pip executable that belongs to the python that you are invoking. Otherwise, you're installing python packages to the wrong version, if you have multiple versions on your machine.

pip --version will list the Python version associated with whatever pip you invoked.

python -m pip install scikit-learn --upgrade will use whatever python you're invoking to invoke its own installation of pip (if it exists). This should work in your use case because it lets you not worry about whatever your pip maps to.

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