Windows解决多版本python执行pip3时出错AttributeError: module 'enum' has no attribute 'IntFlag'?
摘要:
本机装有python2.7和python3.6,执行pip和pip2时没有问题,执行pip3时提示:
C:\Users\>pip3
Traceback (most recent call last):
File "e:\python36\lib\runpy.py", line , in _run_module_as_main
"__main__", mod_spec)
File "e:\python36\lib\runpy.py", line , in _run_code
exec(code, run_globals)
File "E:\Python36\Scripts\pip3.exe\__main__.py", line , in <module>
File "e:\python36\lib\re.py", line , in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
原因:
英文:This is likely caused by the package enum34. Since python 3.4 there's a standard library enum module, so you should uninstall enum34, which is no longer compatible with the enum in the standard library since enum.IntFlag was added in python 3.6.
中文:这可能是由enum34包引起的。因为python 3.4中有一个标准库枚举模块,所以您应该卸载enum34,它不再与标准库中的枚举兼容,因为枚举。IntFlag是在python 3.6中添加的。
解决办法:
pip uninstall enum34
#卸载enum34
卸载后执行pip3,成功,昨天整了大半天终于解决了
C:\Users>pip3 Usage:
pip3 <command> [options] Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.
Windows解决多版本python执行pip3时出错AttributeError: module 'enum' has no attribute 'IntFlag'?的更多相关文章
- pycharm install python packaging tools时遇到AttributeError: '_NamespacePath' object has no attribute 'sort'错误
pycharm install python packaging tools时报错AttributeError: '_NamespacePath' object has no attribute 's ...
- 【Python 脚本报错】AttributeError: 'module 'yyy' has no attribute 'xxx'的解决方法
先参考这篇记录大概理解了原因, 再深入了解下python的import机制, 发现自己的模块之间存在互相import. 比如,A.py中import B,而B.py中也import A了, 现在执行模 ...
- 解决Pycharm更新package出现的问题:AttributeError:module 'pip' has no attribute 'main'
很久一段时间没有更新Pycharm当中的package了,今天打开Pycharm点击package更新,发生了错误,AttributeError:module 'pip' has no attribu ...
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
- python 脚本运行时报错: AttributeError: 'module' object has no attribute ***
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
- python出现AttributeError: module ‘xxx’ has no attribute ‘xxx’错误时,两个解决办法
运行python程序时,也许会出现这样的错误:AttributeError: module ‘xxx’ has no attribute ‘xxx’: 解决该错误有两种方法 1.手动安装该模块 2.检 ...
- 面转栅格之ERROR 999999:执行函数时出错
今天进行矢量面转栅格的操作时,总是出现ERROR 999999:执行函数时出错,如下图所示: 刚开始以为是栅格保存的路径太长的问题,后来发现是矢量面的路径问题,我的矢量面是放在自建的图层组下面,如下图 ...
- python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?
python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdef ...
- PyQt程序执行时报错:AttributeError: 'winTest' object has no attribute 'setCentralWidget'的解决方法
用QtDesigner设计了一个UI界面,保存在文件Ui_wintest.ui中,界面中使用了MainWindow窗口,窗口名字也叫MainWindow,用PyUIC将其转换成了 Ui_wintest ...
随机推荐
- Spring源码研究--下载-编译-导入eclipse-验证
一,环境配置 操作系统:Unbutu14.04LTS JDK: 1.8.0_40 git: 1.9.1 gradle: 2.2.1 二,源码下载-编译-导入eclipse-验证 1,下载 使用git直 ...
- 「小程序JAVA实战」小程序我的个人信息页面开发(41)
转自:https://idig8.com/2018/09/05/xiaochengxujavashizhanxiaochengxuwodegerenxinxiyemiankaifa40/ 已经完成了登 ...
- Handlebars学习第一天
1.什么是handlebars???是用来做什么的??? 首先我们要了解几种前端页面展示的几种模式: a.Struct+vo+el表达式的模式 这种模式的特点:代码看起来比较整齐,但代码解析完才发送到 ...
- java 蓝桥杯算法提高 出现次数最多的整数
思路:其实这道题不是太难,但是这个题太坑了,提交了好多次都不是100,后来才知道,一定一定要在输入数组数据之前先判断一下输进去的n的范围,一定一定要注意,否则就是跟我下面的图片一样的效果了,泪奔~ 问 ...
- 解决SharePoint下载文件时自动修改扩展名的问题
今天,有人告诉了我一个有趣的问题.当用户将一个扩展名为.ai的文件(Adobe illustrator格式的文件)上载到SharePoint 2013文档库中之后,点击它下载时,下载提示栏所显示的文件 ...
- Quartz_2_简单编程式任务调度使用(CronTrigger)
第二个要介绍的任务调度器中的触发器是 CronTrigger ,相比较 SimpleTrigger 来说,CronTrigger 相对灵活,对于复杂的业务需求来说,更加的实用.要在使用 CronTri ...
- 获取时间【NSDate】
[Objective-C]NSDate详解及获取当前时间等常用操作 博客分类: Objective-C objective-cnsdate NSDate类用于保存时间值,同时提供了一些方法来处理一些 ...
- jquery入门 修改网页背景颜色
我们在浏览一些网站,尤其是一些小说网站的时候,都会有修改页面背景颜色的地方,这个功能使用jquery很容易实现. 效果图: show you code: <!doctype html> & ...
- java.util.regex.PatternSyntaxException, dangling metacharacter “?” 解决方法
今天在用正则表达式的时候遇到这样一个异常 看了相关资料后发现这是因为在正则表达式中,像"?","*","\"都是保留字符,所以在用的时候需要 ...
- Selenium自动化测试WebDriver下载
1. 所有版本chrome下载 是不是很难找到老版本的chrome?博主收集了几个下载chrome老版本的网站,其中哪个下载的是原版的就不得而知了. http://www.slimjet.com/ch ...