Reputation:
I have different Python environments on my Ubuntu machine:
/home/user/anaconda3/envs/untitled/bin/python
/home/user/anaconda3/bin/python
What is the easiest way to let an ipython / jupyter notebook work with either the first or the second python environment (if possible it would be good if I do not need to create a virtual environment for that)?
Upvotes: 1
Views: 837
Reputation: 1984
Looks like you already have two conda environments available on your machine. You could install the kernelspec for each one, and you should be able to use Jupyter with either.
# for /home/user/anaconda3/envs/my_env/bin/python
source activate my_env
python -m ipykernel install --user --name my_env --display-name "Python (my_env)"
source deactivate
And now you should see Python (my_env) as an available kernel in Jupyter.
Upvotes: 1