无法在python3

时间:2016-08-20 22:24:45

标签: python

尝试在python3上安装PyGObject时,我不断收到错误消息(Mac OS X 10.9)

 Traceback (most recent call last):
 File "<string>", line 20, in <module>
 File "/private/var/folders/zh/hww3rvgx1rg62zwc8ct51r1r0000gn/T/pip-build-v5qjvi2y/pygobject/setup.py", line 272
   raise SystemExit, 'ERROR: Nothing to do, gio could not be found and is essential.'
                   ^
SyntaxError: invalid syntax

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/zh/hww3rvgx1rg62zwc8ct51r1r0000gn/T/pip-build-v5qjvi2y/pygobject

1 个答案:

答案 0 :(得分:0)

您正在尝试使用python 3安装python2模块。出现语法错误,因为引发异常的语法已发生更改。 raise SystemExit, 'Message'已成为raise SystemExit('Message')

你应该确保你拥有该模块的python3版本。

相关问题