Issue
I'm trying to install scikit-learn
with pip by using pip install scikit-learn
and I got this message:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
WARNING: The scripts f2py, f2py2 and f2py2.7 are installed in '/Users/my_name/Library/Python/2.7/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
However, when I type python --version
it says that my version is 3.7.4. Are python 2.7 and 3.7 both installed on my computer then? If so, is there a way I can get rid of 2.7? Also, I still get a ModuleNotFoundError
when I do from sklearn.cluster import MeanShift
in the mu_editor. I think it's because pip is installing the modules to the python 2.7 directory or something, instead of the python 3.7.4 directory that the mu_editor is connected to. Is there any way I can install the packages to the python 3.7.4 directory instead of the 2.7 one?
Solution
First, use python -v
to check default python installation. If it is the version you are using, continue with python
instead of python3
.
Now run python3 -m pip install scikit-learn
If you are on a Mac, DO NOT DELETE PYTHON 2.7. It is needed for your system to run properly.
Answered By - OctopuSS7
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.