安装importlib 报错,求解决

80 views
Skip to first unread message

Ping Fang

unread,
Dec 7, 2017, 3:01:08 AM12/7/17
to python-cn(华蟒用户组,CPyUG 邮件列表)


在github上下载importlib源代码来安装importlib,在运行 python  setup.py  install 时报错,请问这是怎么回事?求大神指点~

Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    raise Exception("importlib is included in Python 2.7 and newer for 2.x")
Exception: importlib is included in Python 2.7 and newer for 2.x

其源代码和具体截图如附件和下图所示





YS.Zou

unread,
Dec 7, 2017, 5:03:19 AM12/7/17
to pyth...@googlegroups.com
Python 2.7+ 自带 importlib 的意思?

--
邮件来自: `CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
详情: http://code.google.com/p/cpyug/wiki/CpyUg
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
---
您收到此邮件是因为您订阅了Google网上论坛上的“python-cn(华蟒用户组,CPyUG 邮件列表)”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到python-cn+unsubscribe@googlegroups.com
要发帖到此群组,请发送电子邮件至python-cn@googlegroups.com
要查看更多选项,请访问https://groups.google.com/d/optout



--
进出自由才是游戏者的生存之道。

http://www.zouyesheng.com

Tim Gao

unread,
Dec 13, 2017, 8:58:49 PM12/13/17
to pyth...@googlegroups.com
第一个截图表示你的系统里面没有安装 python3;第二个截图表示你的系统里只安装了python26,但 importlib 需要 python27以上才有。看python版本可以这么搞:python --version。

比较简单的方法就装上python3 (yum install python34)或者开个带 python3 的docker/VM。
Best regards,
Tim Gao
Reply all
Reply to author
Forward
0 new messages