An error occurred while entering the conda tag

"EnvironmentLocationNotFound: Not a conda environment: /home/xxx/.conda/envs/anaconda3 "



Conda 4.4 will come later

The reason is a change in the conda info – JSON output. Version 4.3.33 provides envs=[], and version >=4.4 provides envs=[root_env_DIR](always non-empty).

Fixes can be made by:

Look for this file in anaconda’s installation directory: ~ / anaconda3 / PKGS/nb_conda 2.2.1 — py36.0 / lib/python3.6 / site – packages/nb_conda/envmanager py, here (py36.0) there may be different according to the version

Look for this sentence:

return {

    "environments": [root_env] + [get_info(env)

                                  for env in info['envs']]}Copy the code

Modify the return value to add a constraint to the list generator

return {

    "environments": [root_env] + [get_info(env) for env in info['envs']

                                  ifenv ! = root_env['dir']]}Copy the code

No error, but cannot change the conda file, the environment was not found at creation time

Click on the Conda page and select a virtual environment that you already have on your computer but cannot use for JupyterNotebook. Then, find the package ipykernel in the right column and install it.

Then we refresh the Home page, click on the Files page, select the New drop-down menu, and you can see that we have found the Python environment we created earlier. So in order for JupyterNotebook to find the Python virtual environment you created, the environment must have the ipykernel package installed. As for how to install this package in this environment, through PIP, or in jupyter page as we just said, or through conda manager is ok

Refer to the two articles in www.jianshu.com/p/7d8ce818a… https://www.jianshu.com/p/8188c32a3a34

I found a very detailed article on switching conda environment on the Internet

www.pythonheidong.com/blog/articl…