How to add python 3.6 core along with 3.5 on jupyter

I am trying to test the code in Python 3.6, but my default python version for the system is python 3.5. I installed python 3.6 and tried to execute jupyter documentation to install the new python kernel

python3.6 -m pip install ipykernel
python3.6 -m ipykernel install --user

But this did not work, since it shows one core: Python3

Could anyone have both 3.5 and 3.6 in the same jupyter installation?

+9
source share
4 answers

One option is to create a kernel that you can use on a Jupyter laptop. enter image description here

You can do this in a virtual environment:

  1. Open your terminal and enter the following line by line

    virtualenv -p python3.6 py_36_env

    source py_36_env/bin/activate

    pip install ipykernel

    python -m ipykernel install --user --name=py_36_env

    jupyter notebook

  2. jupyter 3.6 (py_36_env) "", , "" jupyter.

+13

Python 3.6 Windows

  • conda install ipykernel
  • conda create -n Python3.6Test python=3.6
  • Python3.6Test
  • pip install ipykernel
  • python -m ipykernel install --name Python3.6Test

3,6 C:\ProgramData\jupyter\\Python3.6Test

Jupitor Notebook , Python3.6Test

+5

Python. Python 3.5:

virtualenv -p /usr/bin/python3.5 py35
source py35/bin/activate
pip install jupyter
jupyter               # Jupyter running Python 3.5
deactivate           # Leave virtualenv

Python 3.6:

virtualenv -p /usr/bin/python3.6 py36
source py36/bin/activate
pip install jupyter
jupyter               # Jupyter running Python 3.6
+2

:

Jupyter Notebook (: Ubuntu 16.04 LTS)

:

!pip install --upgrade pip

:

!pip install virtualenv

Python, :

Python 3.6, Python_3_6:

!virtualenv -p python3.6 Python_3_6

( , Jupyter)

Create a new option with the name of the created environment

Finally, run the following command:

!python -m ipykernel install --user --name=Python_3_6

This will create a new option called Python_3_6 in the menu from which we create a new notebook.

NOTE: You can also run the commands above from the terminal, just do not use '!' in front of teams.

0
source

Source: https://habr.com/ru/post/1676250/


All Articles