1

On my Macbook Pro, I use Anaconda Navigator 1.8.2. for Python2 when I installed it.

I use I've used this link, successfully install a python3.6 Kernel into jupyter notebook. :https://ipython.readthedocs.io/en/latest/install/kernel_install.html

I try the same procedure, by changing python3 to python3.5 (3.6.4 and 3.5.4 respectively if you call which python3 or python3.5 on my mac). Note that the python 3.5 is just downloaded and installed few hours ago from: https://www.python.org/downloads/release/python-354/ and I chose: Mac OS X 64-bit/32-bit installer, to complete the installation

Then I do the following as instructed by Ipython Document: run python3.5 -m pip install ipykernel in terminal

But error goes:

Collecting ipykernel

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

No matching distribution found for ipykernel

You are using pip version 9.0.1, however version 9.0.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

Then I try to upgrade the pip by running this code in terminal: python3.5 -m pip install --upgrade pip

But there is still error: Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:719) - skipping Requirement already up-to-date: pip in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages

You are using pip version 9.0.1, however version 9.0.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

It looks like it's the python3.5's problem, but right now I have no idea what's going on under the hood. If you know how to solve it, please share with me. Thank you

Jason
  • 1,893
  • 1
  • 15
  • 29
  • Why are you mixing Anaconda with the standard distribution? The whole point Anaconda and the `conda` is to serve as an environment management system that deals with installing different interpreters for you... – juanpa.arrivillaga Apr 11 '18 at 05:10
  • @juanpa.arrivillaga Indeed Conda could create virtual environment with python 3.5. But I need to use python 3.5 in jupyter notebook, which requires `python3 -m pip install ipykernel` to be installed – Jason Apr 11 '18 at 05:16
  • So? You can manage that all with `conda`. Adding a bunch of non-managed interpreter installs to your system is a great way to much things up. – juanpa.arrivillaga Apr 11 '18 at 05:17
  • So, the [docs you link to have an example of just that](https://ipython.readthedocs.io/en/latest/install/kernel_install.html#kernels-for-different-environments) – juanpa.arrivillaga Apr 11 '18 at 05:18

1 Answers1

1

From your Mac terminal, try to upgrade pip as follows:

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

Your issue seems to be related to the recent TLS deprecation for pip. Python.org sites are stopping support for TLS versions 1.0 and 1.1. See this other answer if you'd like to know more details.

Anupam
  • 12,420
  • 12
  • 51
  • 82
  • Interesting find. – juanpa.arrivillaga Apr 11 '18 at 05:21
  • May I ask, as I have python 2.7, 3.5 and 3.6 under Versions folder. When implement that, what which python's pip get upgraded? – Jason Apr 11 '18 at 05:26
  • A broader question is that I could use `python2 -m pip install --upgrade pip` for python2.7 and `python3 -m pip install --upgrade pip` for python3.6, but I cannot use `python3.5 -m pip install --upgrade pip` for python 3.5 – Jason Apr 11 '18 at 05:27
  • Oh I got it, by changing `curl https://bootstrap.pypa.io/get-pip.py | python` to `curl https://bootstrap.pypa.io/get-pip.py | python3.5` and I could `python3.5 -m pip install ipykernel`. Thank you very much – Jason Apr 11 '18 at 05:31
  • @Jason Also, using a virtual environment will make your life much easier. It's meant to prevent these kind of version conflicts. – Anupam Apr 11 '18 at 05:33
  • @Anupam Could you share how to make it also available to jupyter notebook? Thanks in advance – Jason Apr 11 '18 at 05:38
  • @Jason - do you mean creating a virtual env? Please see this: http://anbasile.github.io/programming/2017/06/25/jupyter-venv/ – Anupam Apr 11 '18 at 06:06