Python 2 환경의 PIP 를 10.0.3 버 전 으로 업그레이드 한 후 pip 명령 으로 오 류 를 알 립 니 다.

1650 단어 Python
Centos 6 에 기본적으로 설 치 된 버 전 은 python 2.6 입 니 다.pip 를 업그레이드 하면 pip 명령 을 사용 할 수 없습니다.구체 적 인 원인 은 다음 과 같 습 니 다.
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
이 문 제 를 해결 하기 위해 비교적 직접적인 방법 은 바로 PIP 도 구 를 다시 설치 하 는 것 이다.
PIP 다운로드
https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9

PIP 설치
tar -xzvf pip-9.0.1.tar.gz
cd pip-9.0.1
python setup.py install

참고 자료:-CENTOS/RHEL 6 PYTHON PIP ERROR,SYNTAXERROR:INVALID SYNTAX{STR(C.VERSION)FOR C IN ALLCANDIDATES}-Liux 아래 pip 설치 튜 토리 얼

좋은 웹페이지 즐겨찾기