The best answers to the question “In which conda environment is Jupyter executing?” in the category Dev.
I have jupyter/anaconda/python3.5.
How can I know which conda environment is my jupyter notebook running on?
How can I launch jupyter from a new conda environment?
Question 1: Find the current notebook’s conda environment
Open the notebook in Jupyter Notebooks and look in the upper right corner of the screen.
It should say, for example, “Python [env_name]” if the language is Python and it’s using an environment called env_name.
Question 2: Start Jupyter Notebook from within a different conda environment
Activate a conda environment in your terminal using
source activate <environment name> before you run
jupyter notebook. This sets the default environment for Jupyter Notebooks. Otherwise, the [Root] environment is the default.
You can also create new environments from within Jupyter Notebook (home screen, Conda tab, and then click the plus sign).
And you can create a notebook in any environment you want. Select the “Files” tab on the home screen and click the “New” dropdown menu, and in that menu select a Python environment from the list.
As mentioned in the comments, conda support for jupyter notebooks is needed to switch kernels. Seems like this support is now available through conda itself (rather than relying on pip).
conda install nb_conda
which brings three other handy extensions in addition to Notebook Conda Kernels.
If the above ans doesn’t work then try running
conda install ipykernel in new env and then run jupyter notebook from any env, you will be able to see or switch between those kernels.
which environment is jupyter executing:
import sys print(sys.executable)
create kernel for jupyter notebook
source activate myenv python -m ipykernel install --user --name myenv --display-name "Python (myenv)" source activate other-env python -m ipykernel install --user --name other-env --display-name "Python (other-env)"