摘要

本机装有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'?的更多相关文章

  1. pycharm install python packaging tools时遇到AttributeError: '_NamespacePath' object has no attribute 'sort'错误

    pycharm install python packaging tools时报错AttributeError: '_NamespacePath' object has no attribute 's ...

  2. 【Python 脚本报错】AttributeError: 'module 'yyy' has no attribute 'xxx'的解决方法

    先参考这篇记录大概理解了原因, 再深入了解下python的import机制, 发现自己的模块之间存在互相import. 比如,A.py中import B,而B.py中也import A了, 现在执行模 ...

  3. 解决Pycharm更新package出现的问题:AttributeError:module 'pip' has no attribute 'main'

    很久一段时间没有更新Pycharm当中的package了,今天打开Pycharm点击package更新,发生了错误,AttributeError:module 'pip' has no attribu ...

  4. Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  5. python 脚本运行时报错: AttributeError: 'module' object has no attribute ***

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  6. python出现AttributeError: module ‘xxx’ has no attribute ‘xxx’错误时,两个解决办法

    运行python程序时,也许会出现这样的错误:AttributeError: module ‘xxx’ has no attribute ‘xxx’: 解决该错误有两种方法 1.手动安装该模块 2.检 ...

  7. 面转栅格之ERROR 999999:执行函数时出错

    今天进行矢量面转栅格的操作时,总是出现ERROR 999999:执行函数时出错,如下图所示: 刚开始以为是栅格保存的路径太长的问题,后来发现是矢量面的路径问题,我的矢量面是放在自建的图层组下面,如下图 ...

  8. python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?

    python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdef ...

  9. PyQt程序执行时报错:AttributeError: 'winTest' object has no attribute 'setCentralWidget'的解决方法

    用QtDesigner设计了一个UI界面,保存在文件Ui_wintest.ui中,界面中使用了MainWindow窗口,窗口名字也叫MainWindow,用PyUIC将其转换成了 Ui_wintest ...

随机推荐

  1. HTTP接口开发专题四(接收http接口发送过来的请求)

    前面讲了调用http接口的操作,这篇讲下接收http接口的操作.(以Spring MVC为例) 1)如果发送过来的内容类型是application/x-www-form-urlencoded ,则按照 ...

  2. SpringMVC将表单对象序列化成Json字符串提交,以List接收

    出自:http://blog.csdn.net/m0_37595732/article/details/71440853 HTML <%@ page language="java&qu ...

  3. 删除链表之two star programming

    最近偶尔看到一篇关于Linus Torvalds的访问,大神说大部分人都不理解指针.假设被要求写一段链表删除节点的程序,大多数的做法都是跟踪两个指针,当前指针cur和其父节点pre,这种实现很容易理解 ...

  4. springboot mvc beetl模板 自定义错误的后缀问题

    @Component public class BeetlErrorViewResolver implements ErrorViewResolver { private static final M ...

  5. ADB Not Responding - Android Studio

    问题描述: 最近安装了Android Studio v1.0,运行的时候老是这个错误 解决方案: 网上有人说是已经有adb的进程在运行,可是打开任务管理器,找不到对应的adb 进程. 无奈之下,想到a ...

  6. MD5类库(hex_md5)

    /*  * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message  * Digest Algorithm, as ...

  7. manta api

    Authentication 有几个访问方法. 验证对服务的请求的主要方法是使用TLS上的HTTP签名. 在大多数情况下,您只需使用SSH私钥对HTTP Date标头的小写日期:和值进行签名; 这样做 ...

  8. 【jdbc】【c3p0】c3p0三种配置方式【整理】

    c3p0三种配置方式 c3p0的配置方式分为三种,分别是1.setters一个个地设置各个配置项2.类路径下提供一个c3p0.properties文件3.类路径下提供一个c3p0-config.xml ...

  9. boxing & unboxing

    [boxing & unboxing] Boxing is the process of converting a value type to the type object or to an ...

  10. 如何申请新浪SAE,发布自己的网站

    你是否会看见诸如(***.sinaapp.com)类的域名?是否和新浪有什么关系?抑或想要一个免费的空间展示自己的个人主页;没问题,下面我来分享一下SAE的申请流程吧! 首先,打开SAE(http:/ ...