1. 程式人生 > >SyntaxError:operator not allowed in environment markers的解決方法

SyntaxError:operator not allowed in environment markers的解決方法

在部署測試環境時,pip install XXX,出現瞭如下問題:

“File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 738, in comparison
raise SyntaxError(repr(cop)+” operator not allowed in environment markers”)
SyntaxError: ‘<' operator not allowed in environment markers
error in setup command: Error parsing /opt/stack/cinder/setup.cfg: SyntaxError: '<' operator not allowed in environment markers"

出現這個問題,應該是setuptools版本太舊,需要更新升級,可以執行如下命令來進行升級:

pip install --upgrade pip

pip install --upgrade setuptools