1

i'm having trouble downloading libraries using pip (never had this problem before, just started a week or two ago)..

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

I've also tried the following solution

pip install --trusted-host pypi.python.org <package_name>

but that doesnt work either unfortunately. The error i'm getting is as follows:

Collecting pycoin
Could not fetch URL https://pypi.python.org/simple/pycoin/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping
Could not find a version that satisfies the requirement pycoin (from versions: )
No matching distribution found for pycoin

Thank you for your time!

madswed
  • 23
  • 4
  • Possible duplicate of [pip install fails for every package ("Could not find a version that satisfies the requirement")](https://stackoverflow.com/questions/49748063/pip-install-fails-for-every-package-could-not-find-a-version-that-satisfies-th) – Anupam Apr 17 '18 at 12:54
  • I would say this question is not a duplicate of the linked question, as this question addresses the issue of upgrading multiple python versions on macOS, which requires a different solution than those available in the linked question. – dukeluke Apr 23 '18 at 19:19

1 Answers1

2

I had a similar issue, in that I could upgrade pip for my macOS system Python (version 2.7) following this SO answer, but it wouldn't work for any versions of Python 3. Here's an adapted version of that other SO answer that worked for me:

  1. Open up terminal and get the python file that installs pip (since we can't use pip itself) and save it as "get-pip.py": curl https://bootstrap.pypa.io/get-pip.py >> get-pip.py
  2. Upgrade pip for your OS's python version: python get-pip.py (You'll probably need to run it with sudo.)
  3. Upgrade pip for Python 3: python3 get-pip.py (This assumes you have Python 3 symlinked as "python3". If you don't you'll need to provide the full path to your Python 3 version.)

Then you should be good to go! (Check with pip --version, pip3 --version, and/or pip2 --version.)

dukeluke
  • 506
  • 5
  • 19