ERROR: ipykernel requires Python version 3.4 or above

5.9k Views Asked by At

I am using Ubuntu 16.04 lts. My default python binary is python2.7. When I am trying to install ipykernel for hydrogen in atom editor, with the following command

python -m pip install ipykernel

It is giving the following errors

ERROR: ipykernel requires Python version 3.4 or above.

I am trying to install ipykernel for python2. I have already installed python3.7. Also ipython and jupyter notebook is installed.

2

There are 2 best solutions below

1
On BEST ANSWER

Starting with version 5.0 of the kernel, and version 6.0 of IPython, compatibility with Python 2 was dropped. As far as I know, the only solution is to install an earlier release.

In order to have Python 2.7 available in the Jupyter Notebook I installed IPython 5.7, and ipykernel 4.10. If you want to install earlier releases of IPython or ipykernel you can do the following:

  • Uninstall IPython

pip uninstall ipython

  • Reinstall IPython

python2 -m pip install ipython==5.7 --user

  • Install ipykernel

python2 -m pip install ipykernel==4.10 --user

4
On

Try using Anaconda

You can learn how to install Anaconda from here

After that, try creating a virtual environment via:

conda create -n yourenvname python=2.7 anaconda 

And activate it via:

source activate yourenvname

After that, try installing:

pip install ipython

pip intall ipykernel