7

My Conda Environments are not showing up in my Jupiter Notebooks. I've reviewed all the (excellent) dialogue here, but it doesn't appear to work for python 3.9.2.

I tried the following, which didn't work:

conda install jupyter
conda install ipykernel
conda install nb_conda

Then when I try the following conda install nb_conda_kernels I get the following error:

Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: | 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                                                                      

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - nb_conda_kernels -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']

Your python: python=3.9

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

How can I get my conda environments to show in jupyter notebooks in python 3.9.2? Thank you!

tozCSS
  • 5,487
  • 2
  • 34
  • 31
BLimitless
  • 2,060
  • 5
  • 17
  • 32

1 Answers1

7

Try using the conda-forge channel, e.g.:

$ conda install -c conda-forge ipykernel

And you don't need to install jupyter if this conda env is just a kernel to add, if that's what you want to do.

After that, you need to run this in that conda env:

$ python -m ipykernel install --user --name vanilla --display-name "Python 3 (vanilla)"

Replace the name and display-name to your liking.

Gordon Bai
  • 483
  • 5
  • 5
  • Thank you! The python -m ipykernel line worked without needing to do the conda-forge part. Thank you for the help. – BLimitless Feb 27 '21 at 00:34
  • Good to know it works! I spent some time figuring this out for my own server, I can also share experience on remoter ipykernel if you are interested. The most accurate info is always the official doc, they cover most usage scenarios. – Gordon Bai Feb 27 '21 at 01:55
  • If it's fast to post that would be great. I don't need to know it now though, so if it's more than 5 mins for you to type up you could wait till someone in the community asks. Thanks again for the help! – BLimitless Feb 27 '21 at 04:03