[pip] CENTOS 7.9 pip 설치

정리맨·2022년 9월 21일
0

yum install epel-release
y
yum install python-pip
y
y
y
pip --version
=> pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)

yum install python-devel
y
yum groupinstall 'development tools'
y
=> 에러 발생
Complete output from command python setup.py egginfo:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-j2HAY
/pip/setup.py", line 7
def read(rel_path: str) -> str:
^
SyntaxError: invalid syntax
츌처1 : https://jjeongil.tistory.com/1279

조치
=>yum install gcc openssl-devel libffi-devel bzip2-devel
wget https://bootstrap.pypa.io/pip/3.5/get-pip.py 
tar xzf Python-3.7.3.tgz
./configure --enable-optimizations
make altinstall
python3.7 -v (확인)

python 으로 python3.7 불러오기
=>vi /root/.bashrc
i
alias python="/usr/local/bin/python3.7"
:wq!
source /root/.bashrc
python -v(확인)

출처: https://shshsh.tistory.com/168

profile
ㅎㅎ

0개의 댓글