이상학의 개발블로그

[Python] the virtual environment was not created successfully because ensurepip is not available. 본문

Python

[Python] the virtual environment was not created successfully because ensurepip is not available.

학학이 2021. 4. 14. 11:51
$ python --version
Python 3.8.0

$ python3 --version
Python 3.6.9

한 OS에서 여러 버전의 Python이 설치된 경우 발생함

 

$ python3.8 -m venv .venv
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt-get install python3-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: ['/home/lsh/metal-api/.venv38/bin/python3.8', '-Im', 'ensurepip', '--upgrade', '--default-pip']

 

python3-venv 설치하라고 나오지만, python3.8을 사용한다면 아래와 같이 python3.8-venv를 설치해야 한다.

$ apt-get install python3-venv

$ apt-get install python3.8-venv

'Python' 카테고리의 다른 글

Ubuntu 18.04(Bionic) Python 3.8 설치  (0) 2021.03.04
[Python] 딕셔너리 기본 값  (0) 2020.02.21
[Python] 리스트 딕셔너리 중복 제거  (1) 2020.02.13
Comments