2

I have created a conda environment at the command line and installed ipykernel and Jupyter on MacOS 10.14.6 (Mojave) with Conda 4.8.5

(base) Bens-MacBook-Pro:~ benbogart$ conda create --name testenv
(base) Bens-MacBook-Pro:~ benbogart$ conda activate testenv
(testenv) Bens-MacBook-Pro:~ benbogart$ conda install -c conda-forge notebook
(testenv) Bens-MacBook-Pro:~ benbogart$ conda install ipykernal
(testenv) Bens-MacBook-Pro:~ benbogart$ python -m ipykernel install --user --name=testenv

Now if I go into the Jupyter Notebook tree I can see the environment listed:

Image from Jypyter Notebook Tree

But if I open a new notebook with that option, it opens with the base environment, not the new test environment.

In the notebook I run

!echo $CONDA_PREFIX

and get

/Users/benbogart/opt/anaconda3

But if I open Jupyter from the command line:

(testenv) Bens-MacBook-Pro:~ benbogart$ Jupyter Notebook

The notebook uses the testenv even if I select another env in the the Jupyter file tree.

In the notebook I run

!echo $CONDA_PREFIX

and get

/Users/benbogart/opt/anaconda3/envs/testenv

What step am I missing to get the conda environment to work from within Anaconda navigator?

Thanks!

AMC
  • 2,642
  • 7
  • 13
  • 35
B. Bogart
  • 998
  • 6
  • 15
  • Does this answer your question? [How to use Jupyter notebooks in a conda environment?](https://stackoverflow.com/questions/58068818/how-to-use-jupyter-notebooks-in-a-conda-environment) – AMC Sep 28 '20 at 22:08

0 Answers0