无法通过pip install安装TTFQuery

时间:2020-05-31 08:05:47

标签: python pip

我试图使用TTFQuery模块,但是当我编写命令pip3 install TTFQuery时,它返回以下错误。

ERROR: Command errored out with exit status 1:
        command: 'c:\users\pranon rahman\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\PRANON~1\\AppData\\Local\\Temp\\pip-install-z2hpgfba\\TTFQuery\\setup.py'"'"'; __file__='"'"'C:\\Users\\PRANON~1\\AppData\\Local\\Temp\\pip-install-z2hpgfba\\TTFQuery\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);
        code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\PRANON~1\AppData\Local\Temp\pip-pip-egg-info-2u2rs2sz'
         cwd: C:\Users\PRANON~1\AppData\Local\Temp\pip-install-z2hpgfba\TTFQuery\
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\PRANON~1\AppData\Local\Temp\pip-install-z2hpgfba\TTFQuery\setup.py", line 11
        except ImportError, err:
                          ^
    SyntaxError: invalid syntax

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

1 个答案:

答案 0 :(得分:0)

TTFQuery 1.0.5,最后发布于2012年。该代码显然仅适用于Python 2。

2018年有一个beta版本2.0.0b1。请尝试

pip install TTFQuery==2.0.0b1