메뉴 건너뛰기

XEDITION

study

https://stackoverflow.com/questions/64296359/how-can-i-install-pip-for-python2-7-in-ubuntu-20-04


0

Is there any way that I can install "pip" for "Python2.7" ? I could install python2.7 by

sudo apt install python2-minimal

I tried installing pip for this.

sudo apt install python-pip / python2-pip / python2.7-pip

but none worked. Can anybody have solution for this.

2 Answers

0

Pip for Python 2 is not included in the Ubuntu 20.04 repositories.

Try this guide: https://linuxize.com/post/how-to-install-pip-on-ubuntu-20.04/

  •  
    This is weird because after the instruction to download it (curl) I execute it as described but it results in an error message: File "/tmp/tmp62UdRM/pip.zip/pip/_internal/cli/main.py", line 60and sys.stderr.write(f"ERROR: {exc}"). So this is Python3 code, not Python2. Further investigation showed that these f-strings are all over the place in many files in the ZIP. The mentioned get-pip.py script might have dropped Python2 support completely :-( – Alfe yesterday
 
2

Try this one:

sudo apt update
sudo apt install curl
sudo add-apt-repository universe
sudo apt update
sudo curl https://bootstrap.pypa.io/2.7/get-pip.py --output get-pip.py # Fetch get-pip.py for python 2.7 
sudo python2 get-pip.py
pip --version

 

 

 

 


 

 

 

 

 

 

 

 

 

번호 제목 글쓴이 날짜 조회 수
104 맥북 프로 M1 빅서 오류 "손상되었기 때문에 열 수 없습니다" 해결 방법 proin 2022.05.02 1
103 YOLOv4, YOLOv4-tiny 분석 proin 2021.12.16 3
102 OpenCV 4.5.1 Linux 설치 proin 2021.09.16 1
101 CUDA, CUDNN 설치 후 nvcc not found가 나올 때 proin 2021.07.15 4
100 %F0%9F%90%B3 Docker * 한글 설정, 한글 깨짐 해결하기 proin 2021.06.16 1
99 Darknet detector 여러가지 오류 처리하기 proin 2021.04.22 1
98 도커(Docker) 컨테이너 로케일 설정 proin 2021.03.31 1
97 리눅스 find -mtime 옵션 개념 익히기 file proin 2021.03.17 3
96 [리눅스/LInux] history 명령어 및 옵션- 이전에 수행한 명령어 리스트 확인, 동작원리 proin 2021.03.15 2
95 리눅스 파일 찾기, 파일속 문자열 찾기 proin 2021.03.03 1
94 [완료] Nvidia Docker (GPU 사용) 설치 proin 2021.02.18 1
» How can I install pip for Python2.7 in Ubuntu 20.04 proin 2021.02.01 1
92 [TF 2.x] TensorFlow 2.0 에서 multi GPU 사용하기 - 텐서플로우 문제 해결 proin 2021.01.26 1
91 Keras, Tensorflow에서 GPU 똑똑하게 사용하기 - 2부 proin 2021.01.26 2
90 Keras, Tensorflow에서 GPU 똑똑하게 사용하기 - 1부 proin 2021.01.26 1
89 Jupyter Notebook 사용법(주피터 노트북 설치 및 사용법) proin 2021.01.25 1
88 Raspberry Pi 3에 Extra Module(contrib) 포함하여 OpenCV 4.5.0 설치하는 방법 proin 2020.12.14 1
87 [Python] 데이터 베이스(mariaDB)를 연결하여 사용하는 방법 proin 2020.11.09 3
86 [Linux] sudo 실행 시 비밀번호 미리 입력하여 실행하기 proin 2020.11.04 1
85 bios 부팅 메뉴에서“Ubuntu”를 어떻게 제거합니까? (UEFI) proin 2020.09.04 1
위로