下面是输出:
Using cached https://files.pythonhosted.org/packages/e1/37/c617b7de13cc506f75cbb6b88949f5ca0eb1a8229f3f40e4fe59cd469597/pytransform-0.2.3.2.tar.gz
Collecting MDAnalysis==0.8.1 (from pytransform)
Using cached https://files.pythonhosted.org/packages/9b/45/5cfc731f70af562c860d5b79329980b8b380dd8e283847c950c1f7af8d4c/MDAnalysis-0.8.1.tar.gz
ERROR: Command errored out with exit status 1:
command: 'C:\Python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gunot\\AppData\\Local\\Temp\\pip-install-_fymxu0p\\MDAnalysis\\setup.py'"'"'; __file__='"'"'C:\\Users\\gunot\\AppData\\Local\\Temp\\pip-install-_fymxu0p\\MDAnalysis\\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 pip-egg-info
cwd: C:\Users\gunot\AppData\Local\Temp\pip-install-_fymxu0p\MDAnalysis\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\gunot\AppData\Local\Temp\pip-install-_fymxu0p\MDAnalysis\setup.py", line 58
print "MDAnalysis requires Python 2.6 or better. Python %d.%d detected" % \
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("MDAnalysis requires Python 2.6 or better. Python %d.%d detected" % \)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.我不知道为什么它一遍又一遍地说同样的错误
发布于 2021-01-29 19:04:42
您正在尝试安装的包(已存在约5年)具有
MDAnalysis==0.8.1作为要求,它是2014年的版本,因此是为python 2x编写的。在您的错误消息中,您可以看到在MDAnalysis的setup.py中,我们有下面这行
print "MDAnalysis requires Python 2.6 or better. Python %d.%d detected" % 这是print的python 2x语法(没有段落)。
您现在有多个选项:
requires.txt中的pytransform替换为MDAnalysis。然而,这并不能保证工作,因为API可能会让changedMDAnalysis 0.8.1源代码,并尝试将其调整为Python3语法。尽管已不再支持python2,它已到达生命周期的尽头
注意:
查看pytransform的代码,选项2可能是最简单的。即使它不能与最新的开箱即用的MDAnalysis一起工作,代码也只有74行,因此将其更改为较新的API也不会有太大的工作量
https://stackoverflow.com/questions/65952848
复制相似问题