gpt4 book ai didi

uninstallation - 如何卸载通过 distils 安装的 pycocotools

转载 作者:行者123 更新时间:2023-12-05 07:18:23 31 4
gpt4 key购买 nike

我在我的系统中使用 distils 安装了一个 pycocotools 版本。我想从具有更新更新且已修复问题的不同存储库构建和安装。但是我收到以下错误。知道如何解决这个问题吗?

(base) root@tf-notebook-nirandi-855bcb7b58-wxsc9:/notebooks/shared-datasets/shared-datasets/demos/mask-r-cnn# pip install -e git+https://github.com/waleedka/coco.git#egg=coco\&subdirectory=PythonAPI
Obtaining coco from git+https://github.com/waleedka/coco.git#egg=coco&subdirectory=PythonAPI
Cloning https://github.com/waleedka/coco.git to ./src/coco
Running command git clone -q https://github.com/waleedka/coco.git /notebooks/shared-datasets/shared-datasets/demos/mask-r-cnn/src/coco
WARNING: Generating metadata for package coco produced metadata for project name pycocotools. Fix your #egg=coco fragments.
Installing collected packages: pycocotools
Found existing installation: pycocotools 2.0
ERROR: Cannot uninstall 'pycocotools'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

enter image description here

最佳答案

这里贴出最终的解决方案。

第 1 步:升级您的 pip。

python -m pip install --upgrade pip

Step2:找到安装的pycocotools的路径。一种简单的尝试是重新安装 pycocotools,pip 将为您提供路径

 pip install pycocotools

你会得到

Requirement already satisfied: pycocotools in /home/frank/.local/lib/python3.7/site-packages

现在,我们知道 pkg 位于 /home/frank/.local/lib/python3.7/site-packages

第三步:删除相关文件。

cd /home/frank/.local/lib/python3.7/site-packages
rm -rf pycocotools
rm -rf pycocotools-2.0-py3.7.egg-info

结束。

然后你可以重新安装最新版本的 pycocotools 或者永远不会被这个打扰。

关于uninstallation - 如何卸载通过 distils 安装的 pycocotools,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58297750/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com