4

I have installed virtualenv:

pip3 install --user virtualenv

Then I was trying to create an environment for my folder with the next command:

folder_name$ python -m venv ll_env

But instead of the desired result I've got an error:

__The virtual environment was not created successfully because ensurepip is not available.
On Debian/Ubuntu systems, you need to install 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.__

However despite thr error virtualenv folder named ll_env created.

I have no idea why I receive this error. I'm new to Linux. I tried to check if virtualenv exists on system with this command:

pip3 show virtualenv

And I got:

Name: virtualenv
Version: 16.0.0
Summary: Virtual Python Environment builder
Home-page: https://virtualenv.pypa.io/
Author: Ian Bicking
Author-email: ianb@colorstudy.com
License: MIT
Location: /home/just_maverick/.local/lib/python3.6/site-packages
Requires:
Zanna
  • 72,312
Alex
  • 477

1 Answers1

8

As pointed out by this comment by karel.

The answer to your question is actually in your question:

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

apt-get install python3-venv

You may need to use sudo with that command.

To clarify, simply issue the command sudo apt-get install python3-venv or sudo apt install python3-venv either of which will install the python3-venv package, provided of course that you've enabled the universe repository first.

After installing the python3-venv package, recreate your virtual environment.__

Good programmers will often provide hints or outright solutions to problems that are likely to occur. This is an example of the latter.

Elder Geek
  • 36,752