When python3.6 -m venv Errors Occur on Ubuntu

2018-08-14 15:45 (6 years ago) ytyng
$ python3.6 -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/ubuntu/venv/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']

When you encounter this kind of issue on Ubuntu 14 or 16

$ python3.6 -m venv --without-pip venv

$ source venv/bin/activate
$ python --version

$ curl https://bootstrap.pypa.io/get-pip.py | python

Do it with --without-pip.

Currently unrated
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.

Archive

2025
2024
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011