我正在尝试使用以下命令安装djangorestframework扩展:
pip install djangorestframework-extensions
它显示了错误:
ERROR: Command errored out with exit status 1:
command: /home/anamaria/workspace/licenta/AllFest2/festivals/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r9q6vdlo/djangorestframework-extensions/setup.py'"'"'; __file__='"'"'/tmp/pip-install-r9q6vdlo/djangorestframework-extensions/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 /tmp/pip-install-r9q6vdlo/djangorestframework-extensions/pip-egg-info
cwd: /tmp/pip-install-r9q6vdlo/djangorestframework-extensions/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-r9q6vdlo/djangorestframework-extensions/setup.py", line 48
print "You probably want to also tag the version now:"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("You probably want to also tag the version now:")?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
我该怎么办
这个包似乎在Python2和python3之间存在不兼容。 您可以尝试手动修复“/tmp/pip-install-r9q6vdlo/djangorestframework extensions/setup.py”,将所有“打印某物”替换为“打印(某物)” 它可能会失败,因此如果您有选择的话,可能最好使用Python2来运行它,尽管Python2现在已经过时了
相关问题 更多 >
编程相关推荐