Outils pour utilisateurs

Outils du site


tech:utiliser_virtualenv_dans_un_notebook_ipython

Utiliser virtualenv dans un notebook iPython

Source : https://help.pythonanywhere.com/pages/IPythonNotebookVirtualenvs/

Install the ipython kernel module into your virtualenv

python3 -m venv plop
cd plop
source bin/activate
pip install --upgrade pip
pip install ipykernel
#deactivate

Now run the kernel “self-install” script

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

Replacing the --name parameter as appropriate.

You should now be able to see your kernel in the IPython notebook menu: Kernel → Change kernel and be able so switch to it (you may need to refresh the page before it appears in the list). IPython will remember which kernel to use for that notebook from then on.

tech/utiliser_virtualenv_dans_un_notebook_ipython.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki