尝试使用 conda install 来获得 anaconda-clean 但环境无法解决并且开始对冲突的分析非常缓慢

Ale*_*ett 1 python anaconda conda

我最近在使用 anaconda 时遇到了很多问题。开始时我无法使用 conda install 安装软件包,每次都导致以下错误:

CondaHTTPError: HTTP 000 CONNECTION FAILED for url
Run Code Online (Sandbox Code Playgroud)

我多次尝试卸载并重新安装 anaconda,但问题仍然存在。

然后我发现,如果我退出 VPN(这是在运行 Windows 7 的工作计算机上),我可以安装软件包,但会收到以下错误消息:

ERROR: Registry editing has been disabled by your administrator. 
 if "" == "" (set "VSINSTALLDIR=" ) 
 if "" == "" ( ECHO "WARNING: Did not find VS in registry or in VS140COMNTOOLS env var - your compiler 
 may not work" GOTO End ) "WARNING: Did not find VS in registry or in VS140COMNTOOLS env var - your compiler may not work" The system cannot find the batch label specified - End
Run Code Online (Sandbox Code Playgroud)

这既发生在默认的 anaconda 环境中,也发生在我创建的环境中。我注意到在我创建的包中似乎按预期工作。

因为我遇到了很多问题并且已经卸载并重新安装了 anaconda,所以我担心在这些卸载/重新安装周期中我错过了一些事情,这会导致问题。我目前正在尝试使用 anaconda-clean 从我的计算机上完全卸载 anaconda,但是当我运行命令时

conda install anaconda-clean
Run Code Online (Sandbox Code Playgroud)

我知道最初的冻结求解和灵活求解都失败并且存在冲突。

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible so
lve.
Solving environment: failed with repodata from current_repodata.json, will retry
 with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible so
lve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
Examining pip:  24%|??????                  | 87/359 [00:00<00:00, 3624.97it/s]
Comparing specs that have this dependency:   0%|       | 0/232 [00:00<?, ?it/-
Comparing specs that have this dependency:   0%| | 1/232 [00:04<18:36,  4.83s\ t
Comparing specs that have this dependency:   1%| | 2/232 [00:05<09:36,  2.50s- t
Comparing specs that have this dependency:   1%| | 3/232 [00:05<06:44,  1.77s/ t
Comparing specs that have this dependency:   2%| | 4/232 [00:05<05:21,  1.41s| t
Comparing specs that have this dependency:   2%| | 5/232 [00:05<04:30,  1.19s- t
Comparing specs that have this dependency:   3%| | 6/232 [00:06<03:55,  1.04s/ t
Comparing specs that have this dependency:   3%| | 7/232 [00:06<03:31,  1.07i| s
Comparing specs that have this dependency:   3%| | 8/232 [00:06<03:15,  1.15i\ s
]
Comparing specs that have this dependency:   4%| | 9/232 [00:07<03:01,  1.23i/ s
Comparing specs that have this dependency:   4%| | 10/232 [00:14<05:18,  1.43- i
Comparing specs that have this dependency:   5%| | 11/232 [00:14<05:00,  1.36/ i
t]
Comparing specs that have this dependency:   5%| | 12/232 [00:15<04:40,  1.27- i
Comparing specs that have this dependency:   6%| | 13/232 [00:27<07:39,  2.10s/i
t]                                                                           /
Comparing specs that have this dependency:   6%| | 15/232 [00:27<06:39,  1.84- i
Comparing specs that have this dependency:   7%| | 16/232 [00:28<06:24,  1.78/ i
Run Code Online (Sandbox Code Playgroud)

我无法完全完成对冲突的分析,因为它已经运行了几个小时,并且仍然只是部分完成。任何人都可以就可能导致冲突分析运行如此缓慢的原因以及我如何更有效地从我的计算机上彻底清除 anaconda 提出建议吗?

mer*_*erv 5

你可以在anaconda-clean任何地方运行,也就是说,你不必将它安装到你的基础环境中

conda create -n cleaner anaconda-clean
conda activate cleaner
anaconda-clean
Run Code Online (Sandbox Code Playgroud)

此外,它只是一个美化的文件删除器。它检测并提示您删除以下文件/目录:

FILES = [
    '.anaconda', '.astropy', '.continuum',
    '.conda', '.condamanager', '.condarc',
    '.enthought', '.idlerc', '.glue', '.ipynb_checkpoints', '.ipython',
    '.jupyter', '.matplotlib', '.python-eggs',
    '.spyder2', '.spyder2-py3', '.theano',
]
Run Code Online (Sandbox Code Playgroud)

源代码中列出。您可能可以更快地手动执行此操作。我认为anaconda-clean对于系统管理员来说,土地的效用更多。