2016-08-20 49 views
0

我不斷收到錯誤信息,同時嘗試在python3安裝PyGObject安裝pyGObject鍵(Mac OS X 10.9)麻煩的python3

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 

回答

0

您正在試圖安裝一個python2模塊與Python 3時發生語法錯誤,因爲對引發異常的語法進行了更改。 raise SystemExit, 'Message'已成爲raise SystemExit('Message')

您應該確保您擁有模塊的python3版本。