'Using virtualenv on Jupyter Notebook
I trying to use virtualenv on jupyter notebook, to use all packages installed in an environment, but inside jupyter they are not recognized.
Already tried:
pip install tornado==4.5.3
pip install ipykernel==4.8.2
What I do is:
Initializing the environment on prompt (windows 7):
Move to directory of environment: cd C:\Python\Envs\env1\Scripts
and use: activate now the promt show (env1), so it's active.
From there, I move to another directory and call jupyter, but when starts, the package installed on envoriment are not callable.
How we can active the environment on jupyter?
Solution 1:[1]
Maybe you should install an ipykernel inside your venv first.
virtualenv .venv.venv\Scripts\activate.batto activate the venv.pip install ipykernelipykernel install --user --name .venvto install a new kernel named.venv.jupyter notebookhere and you can select your new kernel.
REFERENCE: Kernels for different environments
Solution 2:[2]
for Max/Linux users:
python -m venv venv
source venv/bin/activate
pip install jupyter
ipython kernel install --user --name=venv
jupyter notebook
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Vova |
