【问题标题】:How to uninstall pycocotools installed via distils如何卸载通过 distils 安装的 pycocotools
【发布时间】:2020-02-06 09:55:33
【问题描述】:

我在我的系统中使用 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.

【问题讨论】:

    标签: uninstallation distutils pycocotools


    【解决方案1】:

    我在这里发布最终解决方案。

    第 1 步:升级您的点子。

    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

    Step3:删除相关文件。

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

    结束。

    然后您可以重新安装最新版本的 pycocotools,否则就再也不用担心了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-11
      • 2017-08-15
      • 2011-06-26
      • 1970-01-01
      • 1970-01-01
      • 2011-07-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多