Not sure how to fix this, or how it got corrupted. This is conda on a jupyterhub install.
Error Message:
EnvironmentLocationNotFound: Not a conda environment
Pics Below:
Image from Conda
tab (there is an redundant anaconda3
env showing up):
Image of error when loading:
This is a confirmed bug in nb_conda
for conda version >=4.4
:
The reason is the change of
conda info --json
output. Fresh installation of version 4.3.33 givesenvs=[]
, version >=4.4 givesenvs=[root_env_dir]
(always non empty).
It's not fixed in current released version yet (nb_conda 2.2.1
), but we can fix this bug manually, by changing the current bug code base in your local machine: ~/anaconda3/pkgs/nb_conda-2.2.1-py36h349edbb_0/lib/python3.6/site-packages/nb_conda/envmanager.py
, note that your own anaconda root dir (~/anaconda3
) and pkgs build version(py36h349edbb_0
) might be different.
FROM:
return {
"environments": [root_env] + [get_info(env)
for env in info['envs']]
}
TO:
return {
"environments": [root_env] + [get_info(env) for env in info['envs']
if env != root_env['dir']]
}
Then, shut down any jupyter notebook server and restart one, the anaconda3
env will gone.
This is either a bug in nbconda
, ot a stale kernelspec file.
to fix it check whether /home/user/.conda/envs/anaconda3 exists
, if it does remove it.
Issue a jupyter kernelspec list
in a terminal, for me it gives:
$ jupyter kernelspec list
Available kernels:
code_scattering /usr/local/share/jupyter/kernels/code_scattering
meetup /usr/local/share/jupyter/kernels/meetup
octave /usr/local/share/jupyter/kernels/octave
python2 /usr/local/share/jupyter/kernels/python2
python3 /usr/local/share/jupyter/kernels/python3
pythonroot /usr/local/share/jupyter/kernels/pythonroot
it should list all kernelspec and their location. Find the corresponding env and delete the folder.
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