I am using a jupyter notebook, and inside this running jupyter notebook I want to use a virtualenv.
I was able to create and source(?) a virtualenv by using these commands
!virtualenv venv
!. venv/bin/activate
but it looks like python
is still being used from the standard location
!which python
/opt/conda/bin/python
Is there any way to create and switch virtual environments from inside a running jupyter notebook?
After activating the venv
pip install ipykernel
ipython kernel install --user --name=venv
jupyter notebook
In jupyter Notebook you would be able to choose between venv
and python x
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With