我正在尝试在我的MacBook上安装IMDbPY,它运行在10.12.4和Python3.5.2版本上。我确实找到了一些解决这个问题的问题线索,但提供的建议似乎对我没有帮助。以下是我的终端的输出。
host-vlth5x-205:IMDbPY-3.5 apple$ pip install IMDbPY
Collecting IMDbPY
Using cached IMDbPY-5.1.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/gd/f_5prpbn13j_xy22k_4nlvgh0000gn/T/pip-build-k_hgg84y/IMDbPY/setup.py", line 200
print 'Created locale for: %s.' % ' '.join(languages)
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/gd/f_5prpbn13j_xy22k_4nlvgh0000gn/T/pip-build-k_hgg84y/IMDbPY/在此之后,我已经尝试下载最新稳定版本的IMDbPY-3.5 here,并通过终端手动安装软件包,结果显示以下错误:
host-vlth5x-205:IMDbPY-3.5 apple$ python setup.py
File "setup.py", line 128
except SystemExit, e:
^
SyntaxError: invalid syntax请帮我弄清楚这件事。谢谢!
发布于 2017-05-20 17:14:05
目前,IMDbPY是一个仅支持Python2.7的库。它还不能在Python 3.x上工作。
要解决问题,请安装Python 2.7
https://stackoverflow.com/questions/43332725
复制相似问题