当前位置:   article > 正文

ERROR: Cannot uninstall ‘certifi‘. It is a distutils installed project and thus we cannot accurately_found existing installation: certifi 2018.8.24 err

found existing installation: certifi 2018.8.24 error: cannot uninstall 'cert

想要安装certifi2023.11.17

pip install certifi version==2023.11.17,出现错误

  1. Attempting uninstall: certifi
  2.     Found existing installation: certifi 2018.8.24
  3. ERROR: Cannot uninstall 'certifi'. It is a distutils installed project and thus we cannot accurately
  4. determine which files belong to it which would lead to only a partial uninstall.

尝试了pip install certifi --ignore-installed,收集的包是最新版,安装的仍然是2018.8.24

  1. Collecting certifi
  2. Using cached certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
  3. Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)
  4. Installing collected packages: certifi
  5. Successfully installed certifi-2018.8.24

尝试卸载pip uninstall -y certifi,提示同样错误

  1. Found existing installation: certifi 2018.8.24
  2. ERROR: Cannot uninstall 'certifi'. It is a distutils installed project and thus we cannot accurately
  3. determine which files belong to it which would lead to only a partial uninstall.

尝试强制更新pip install certifi --upgrade --force-reinstall,同样错误

  1. Collecting certifi
  2. Using cached certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
  3. Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)
  4. Installing collected packages: certifi
  5. Attempting uninstall: certifi
  6. Found existing installation: certifi 2018.8.24
  7. ERROR: Cannot uninstall 'certifi'. It is a distutils installed project and thus we cannot accurately
  8. determine which files belong to it which would lead to only a partial uninstall.

找到anaconda\install\Lib\site-packages文件夹,删除certifi文件夹,再安装pip install certifi --ignore-installed,又重新下回了2018.8.24版

  1. ollecting certifi
  2. Using cached certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
  3. Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)
  4. Installing collected packages: certifi
  5. Successfully installed certifi-2018.8.24

再删除certifi文件夹,去pypi找到最新版certifi下载到anaconda\install\Lib\site-packages文件夹下,安装,pip install certifi-2024.2.2-py3-none-any.whl

  1. certifi is already installed with the same version as the provided wheel. Use --force-reinstall to force
  2. an installation of the wheel.

发现已安装该版本

尝试安装2023版本,pip install certifi version==2023.11.17,成功。

  1. Attempting uninstall: certifi
  2. Found existing installation: certifi 2024.2.2
  3. Uninstalling certifi-2024.2.2:
  4. Successfully uninstalled certifi-2024.2.2
  5. Successfully installed certifi-2023.11.17

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/917922
推荐阅读
相关标签
  

闽ICP备14008679号