Cannot uninstall ‘pytz‘.It is a distutils installed project and thus we cannot accurately determi...

本文主要是介绍Cannot uninstall ‘pytz‘.It is a distutils installed project and thus we cannot accurately determi...,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

文章目录

  • 问题描述:
  • 解决办法:
      • 方法一:
      • 方法二:
      • 方法三:
      • 附录:
        • python pip install 操作及问题汇总
        • python pip镜像

问题描述:

升级pandas的时候出现下面的报错。
ERROR:Cannot uninstall ‘pytz’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial unistall. 即无法卸载这个包。原因可能是之前的第三方库是通过离线文件方式安装的, 删除相应的egg-info后可以尝试解决。
在升级其他包的时候也可能会遇到类似的问题。解决方法是一样的。
ERROR:Cannot uninstall 'pytz'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial unistall

解决办法:

方法一:

在Anaconda目录下找到site-packages文件夹,如D:\Anaconda\Lib\site-packages,找到下图中的文件,删除。在这里插入图片描述
删除后,再重新安装升级pandas
pip --upgrade pandas
安装成功后,在D:\Anaconda\Lib\site-packages目录下会出现下图中的文件夹,之后一切正常。
pytz

方法二:

linux上可以强制安装
sudo pip install pyqt --upgrade --ignore-installed pyqt
参考:https://www.cnblogs.com/qq952693358/p/9425544.html

方法三:

网上下载相应的安装包
下载好对应版本的 whl文件,在下载文件下,打开终端,输入 “pip install xxx.whl” 显示安装成功。
备注:方法一是本人用的方法,觉的比较便捷,大家也可以用方法二和三。

附录:

python pip install 操作及问题汇总

python pip install 操作及问题汇总

python pip镜像

python pip镜像

这篇关于Cannot uninstall ‘pytz‘.It is a distutils installed project and thus we cannot accurately determi...的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/358412

相关文章

ImportError: cannot import name ‘print_log‘ from ‘logging‘

mmcv升级到2.+后删除了很多 解决 查FAQ文档,找到 添加到mmcv.utils下即可

vue 父组件调用子组件的方法报错,“TypeError: Cannot read property ‘subDialogRef‘ of undefined“

vue 父组件调用子组件的方法报错,“TypeError: Cannot read property ‘subDialogRef’ of undefined” 最近用vue做的一个界面,引入了一个子组件,在父组件中调用子组件的方法时,报错提示: [Vue warn]: Error in v-on handler: “TypeError: Cannot read property ‘methods

Debugging Lua Project created in Cocos Code IDE creates “Waiting for debugger to connect” in Win-7

转自 I Installed Cocos Code IDE and created a new Lua Project. When Debugging the Project(F11) the game window pops up and gives me the message waiting for debugger to connect and then freezes. Also a

Unstructured cannot write mode RGBA as JPEG 错误解决

Unstructured cannot write mode RGBA as JPEG 错误解决 0. 错误详细1. 解决方法 0. 错误详细 Image Extraction Error: Skipping the failed imageTraceback (most recent call last):File "/root/miniconda3/envs/learn-y

Cannot read property ‘length‘ of null while opening vscode terminal

同一问题地址:Cannot read property ‘length’ of null while opening vscode terminal 问题描述 One day, 我在ubuntu 18.04下用vscode打开一个项目,并想和往常一样在vscode使用终端,发现报错Cannot read property 'length' of null。 解决 打开setting.jso

The import com.google cannot be resolved

The import com.google cannot be resolved,报错: 第一感觉就是缺少jar包,因为项目用maven管理,所以在pom.xml中添加: <dependency>  <groupId>com.google.code.gson</groupId>  <artifactId>gson</artifactId>  <version>2.3.1</ver

error while loading shared libraries: libnuma.so.1: cannot open shared object file:

腾讯云CentOS,安装Mysql时: 1.yum remove libnuma.so.1 2.yum install numactl.x86_64

【NodeJS】Error: Cannot find module 'ms'

转载自:http://blog.csdn.net/echo_ae/article/details/75097004 问题: Error: Cannot find module 'ms'at Function.Module._resolveFilename (module.js:469:15)at Function.Module._load (module.js:417:25)at Module

SVN Cornerstone 报错信息 xcodeproj cannot be opened because the project file cannot be parsed.

svn点击update 之后,打开xcode工程文件,会出现  xxx..xcodeproj  cannot be opened because the project file cannot be parsed. 发现项目中代码全没了。只有一个空的工程名字,因为xcodeproj工程文件冲突了,然后就是svn强制给你更新了,内部的文件冲突了,你们改了同样的地方的一段代码,可能是你们只是多加

org.hibernate.transaction.JDBCTransaction cannot be cast to javax.transaction.Transaction

org.hibernate.transaction.JDBCTransaction cannot be cast to javax.transaction.Transaction 这部分的具体地方为Transaction tr =(Transaction) session.beginTransaction();  错误原因:包倒错了,应该导入的包是hibernate的Transaction包