【问题标题】:Error while Installing IMDbPY on MacBook在 MacBook 上安装 IMDbPY 时出错
【发布时间】:2017-09-06 01:28:25
【问题描述】:

我正在尝试在运行 10.12.4 且 Python 版本为 3.5.2 的 MacBook 上安装 IMDbPY。我确实找到了几个解决该问题的问题线程,但所提供的建议似乎对我没有帮助。 以下是我的终端的输出。

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

请帮我解决这个问题。谢谢!

【问题讨论】:

    标签: python macos packages imdbpy


    【解决方案1】:

    目前,IMDbPY 是一个仅限 Python 2.7 的库。它(还)不能在 Python 3.x 上运行。

    要解决您的问题,请安装 Python 2.7

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-06-29
      • 1970-01-01
      • 2019-09-01
      • 1970-01-01
      • 2011-07-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多