conda uninstall 退出而不删除任何内容

发布于 2025-01-11 05:50:37 字数 583 浏览 0 评论 0原文

我尝试使用 conda uninstall 删除软件包。该命令运行很长时间,占用大量内存(但我相信不会耗尽),然后退出,没有任何迹象表明已完成“解决环境”步骤。当我检查时,包裹还在。例如:

(base) pm@pm:~/Software/anaconda3/bin$ conda uninstall -n base pytorch
Collecting package metadata (repodata.json): done
Solving environment: - (base) pm@pm:~/Software/anaconda3/bin$ conda list -n base -f pytorch
# packages in environment at /home/pm/Software/anaconda3:
#
# Name                    Version                   Build  Channel
pytorch                   1.7.1           py3.7_cuda10.1.243_cudnn7.6.3_0    pytorch

我也尝试过删除,它的作用完全相同。欢迎提出建议!

I've tried to remove packages using conda uninstall. The command runs for a long time, takes up a large amount of memory (but doesn't run out I believe) and then quits with no indication of having completed the 'Solving environment' step. When I check, the package is still there. For example:

(base) pm@pm:~/Software/anaconda3/bin$ conda uninstall -n base pytorch
Collecting package metadata (repodata.json): done
Solving environment: - (base) pm@pm:~/Software/anaconda3/bin$ conda list -n base -f pytorch
# packages in environment at /home/pm/Software/anaconda3:
#
# Name                    Version                   Build  Channel
pytorch                   1.7.1           py3.7_cuda10.1.243_cudnn7.6.3_0    pytorch

I've also tried remove, which does exactly the same thing. Suggestions welcome!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

巴黎夜雨 2025-01-18 05:50:37

如果您在这里是因为尝试安装无法通过 conda 获得的预版或测试版软件包,我可以通过 pip 进行升级。

我通过 conda 安装了 h3-py,它安装了 v3.7。

$ conda install h3-py

...

The following NEW packages will be INSTALLED:

  h3-py              conda-forge/linux-64::h3-py-3.7.4-py311ha362b79_1 None

然后他们发布了 v4,它极大地改变了 API,我想更新。 Anaconda 挂起并最终在卸载或删除时被杀死:

$ conda uninstall h3-py                                  
Collecting package metadata (repodata.json): \ Killed

但是 pip 挽救了这一天(--update 将获取最新版本,--pre 是为了让我获取预发行版):

$ pip install h3 --upgrade --pre

...

Successfully built h3
Installing collected packages: h3
  Attempting uninstall: h3
    Found existing installation: h3 3.7.4
    Uninstalling h3-3.7.4:
      Successfully uninstalled h3-3.7.4
Successfully installed h3-4.0.0b1

不过,如果 conda uninstall 有效,那就太好了。

If you're here because you're trying to install a pre or beta package that isn't available via conda, I was able to do an upgrade via pip.

I had installed h3-py via conda, which installed v3.7.

$ conda install h3-py

...

The following NEW packages will be INSTALLED:

  h3-py              conda-forge/linux-64::h3-py-3.7.4-py311ha362b79_1 None

They then released v4, which drastically changed the API and I wanted to update. Anaconda was hanging and eventually killed on an uninstall or remove:

$ conda uninstall h3-py                                  
Collecting package metadata (repodata.json): \ Killed

But pip saved the day (the --update will just get the latest, the --pre was for me to get the pre-release):

$ pip install h3 --upgrade --pre

...

Successfully built h3
Installing collected packages: h3
  Attempting uninstall: h3
    Found existing installation: h3 3.7.4
    Uninstalling h3-3.7.4:
      Successfully uninstalled h3-3.7.4
Successfully installed h3-4.0.0b1

Still, would be great if conda uninstall worked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文