当前位置: 代码迷 >> 综合 >> python setup.py install 遇到 SyntaxError: operator not allowed in environment markers
  详细解决方案

python setup.py install 遇到 SyntaxError: operator not allowed in environment markers

热度:62   发布时间:2023-11-03 22:33:38.0

python setup.py install 遇到 SyntaxError: ‘<’ operator not allowed in environment markers

Marker evaluation failed, see the following error.  For more information see: http://docs.openstack.org/pbr/latest/user/using.html#environment-markers
ERROR:root:Error parsing
Traceback (most recent call last):File "/usr/lib/python2.7/site-packages/pbr/core.py", line 96, in pbrattrs = util.cfg_to_args(path, dist.script_args)File "/usr/lib/python2.7/site-packages/pbr/util.py", line 273, in cfg_to_argskwargs = setup_cfg_to_setup_kwargs(config, script_args)File "/usr/lib/python2.7/site-packages/pbr/util.py", line 472, in setup_cfg_to_setup_kwargsif pkg_resources.evaluate_marker('(%s)' % env_marker):File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1364, in evaluate_markerreturn interpret(parser.expr(text).totuple(1)[1])File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1342, in interpretreturn op(nodelist)File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1307, in atomreturn interpret(nodelist[2])File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1342, in interpretreturn op(nodelist)File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1324, in comparisonraise SyntaxError(repr(cop)+" operator not allowed in environment markers")
SyntaxError: '<' operator not allowed in environment markers
error in setup command: Error parsing /root/diskimage-builder/setup.cfg: SyntaxError: '<' operator not allowed in environment markers

更新setuptools
pip install -U setuptools

  相关解决方案