1

I am running the latest Python version 3.6.4.

I install pip via these instructions from https://pip.pypa.io/en/stable/installing/

To install pip, securely download get-pip.py. [1]:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Inspect get-pip.py for any malevolence. Then run the following:

python get-pip.py

pip install -U pip

Finally when I get to install SciKit Learn here is what I ran into:

pip install -U scikit-learn

Collecting scikit-learn Could not fetch URL https://pypi.python.org/simple/scikit-learn/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping

Could not find a version that satisfies the requirement scikit-learn (from versions: ) No matching distribution found for scikit-learn

I couldn't find anything on stackover specifically addresing my problem and tried some suggested solution without success. (i.e. pip uninstall scikit-learn, sudo pip install scikit-learn)

I am really stumped here on why I cannot install scikit learn package. I want to start using it. Can anyone help me out?

Willy
  • 13
  • 4

1 Answers1

0

Chances are, this was a temporary issue with the cert. I just loaded it (using a 3.6.5 virtual environment with pip 10.0.0) and had no issues. I also loaded https://pypi.python.org/simple/scikit-learn/ into Opera and the cert is definitely valid now.

I would also suggest using a virtualenv (https://virtualenv.pypa.io/en/stable/). It avoids some frustrating issues like pip pointing to the 2.7 version instead of pip3.

DharmaDog
  • 1
  • 1
  • I still have this issue. Should I uninstall Python and reinstall it? Can I get it working without using a virtual env as an extra step? – Willy Apr 17 '18 at 17:12
  • The virtualenv is definitely optional, it just removes some possible scenarios when more than one Python is installed into the OSX /Libraries and also manages dependencies if you have more than one active Python project going. If you have 2.7 and 3.6 installed, you might run _pip --version_ and be sure you are using the correct one or just always use _pip3_ to be sure. – DharmaDog Apr 17 '18 at 17:45
  • When I ran pip 8.1.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7) it says: > pip 8.1.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7) But I deleted Python 2.7 and installed Python 3.6.4 (the latest version) so I should only have that. Why is it saying I have Python 2.7 and how do I remove it completely? – Willy Apr 18 '18 at 12:51
  • Python on MAC follows Apples rules. That's why I really prefer the virtualenv path. One you're in the soup, the only real answer is to remove all Python and start over following the MAC guides. http://docs.python-guide.org/en/latest/ – DharmaDog May 08 '18 at 14:07