python - 损坏的蟒蛇环境'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
解决方案
推荐阅读
- mysql - SQL如何将相同数据值的总和相加
- reactjs - 如何使用 axios 在 React Native 中获取数据
- ms-access - IIS 上的经典 ASP 网络故障转移
- ruby-on-rails - 使用“Active Storage”Ruby on Rails 验证正确的图像类型
- flutter - 未处理的异常:MissingPluginException(在通道 plugins.flutter.io/share 上找不到方法共享的实现)
- spring - 由于嵌入式 Elasticsearch,测试执行会持续很长时间
- android - DialogFragment 显示时是否有回调?
- java - 为什么值没有增加 int Firebase 数据库
- python - 在 Selenium 中选择带有样式标签和文本的元素
- python - 如何在 Python 中合并具有相同 ID 的多个列表中的元素?