首页 > 解决方案 > 损坏的蟒蛇环境'EnvironmentLocationNotFound'

问题描述

EnvironmentLocationNotFound在其中一个环境中遇到错误,从创建新环境requirements.txt 并没有解决问题。我认为该错误是由不正确地关闭 jupyter notebook 造成的。打字python什么也不做并打开Microsoft Store(这有点有趣):

tf_2) C:\Users\user>conda list

EnvironmentLocationNotFound: Not a conda environment: C:\Users\user\anaconda3\envs\tf_2


(tf_2) C:\Users\user>conda info

     active environment : tf_2
    active env location : C:\Users\user\anaconda3\envs\tf_2
            shell level : 2
       user config file : C:\Users\user\.condarc
 populated config files : C:\Users\user\.condarc
          conda version : 4.9.2
    conda-build version : 3.21.4
         python version : 3.8.5.final.0
       virtual packages : __cuda=11.1=0
                          __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\user\anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
                          https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Users\user\anaconda3\pkgs
                          C:\Users\user\.conda\pkgs
                          C:\Users\user\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\user\anaconda3\envs
                          C:\Users\user\.conda\envs
                          C:\Users\user\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.5 Windows/10 Windows/10.0.19041
          administrator : False
             netrc file : None
           offline mode : False

第二个错误是:

(new_tf2) C:\Users\laptop>conda create --name tf2 --gile requirements.txt
usage: conda-script.py [-h] [-V] command ...
conda-script.py: error: unrecognized arguments: --gile

(new_tf2) C:\Users\laptop>conda create --name tf2 --file requirements.txt
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels

标签: pythoncondaenvironment

解决方案


推荐阅读