jupyter报错EnvironmentLocationNotFound: Not a conda environment: /root/anaconda3/envs/anaconda3

解决方案

  • 环境Anaconde
  • 打开/anaconda3/pkgs/nb_conda-2.2.1-py37_0/lib/python3.7/site-packages/nb_conda/envmanager.py文件
    • 找到以下代码

      return {
               
          "environments": [root_env] + [get_info(env)
                                        for env in info['envs']]
      }
      
    • 修改为

      return {
               
      
          "environments": [root_env] + [get_info(env) for env in info['envs']
      
                                        if env != root_env['dir']]
      
      }
      
  • 重启jupyter notebook

你可能感兴趣的:(#,python环境)