加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

Windows解决多版本python执行pip3时出错AttributeError: module

发布时间:2020-12-14 02:44:20 所属栏目:Windows 来源:网络整理
导读:摘要 : 本机装有python2.7和python3.6,执行pip和pip2时没有问题,执行pip3时提示: C:Users pip3Traceback (most recent call last): File " e:python36librunpy.py " ,line 193 , in _run_module_as_main " __main__ " ,mod_spec) File " e:python3

摘要

本机装有python2.7和python3.6,执行pip和pip2时没有问题,执行pip3时提示:

C:Users&;pip3
Traceback (most recent call last):
  File "e:python36librunpy.py",line 193,in _run_module_as_main
    "__main__",mod_spec)
  File "e:python36librunpy.py",line 85,in _run_code
    exec(code,run_globals)
  File "E:Python36Scriptspip3.exe__main__.py",line 2,in <module>
  File "e:python36libre.py",line 142,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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读