CentOS/RHEL 6 Python PIP error, SyntaxError: invalid syntax {str(c.version) for c in all_candidates}

If you’re attempting to upgrade the version of PIP on CentOS or RHEL 6 from the default 7.1.0 to a newer version, as of April 14th 2018 when PIP 10.0.0 was released you will run into issues since EL6 ships with Python 2.6 as standard. Since you cannot upgrade the default version of Python because it will break in-built tooling such as Yum, you’ll need to version lock PIP when you upgrade it to 9.0.3. This is the last stable version of PIP that is compatible with Python 2.6

1 comment

Leave a Reply to 「PYTHON」- pip:用于 Python 的模块安装程序(通过 pip 安装 Python 模块) - K4NZ BLOG Cancel reply