Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

apt-get install python3-venv is not working

I am using a chromebook, using Debian. I need to run the terminal command python -m venv env, but when I use it, I get the errors

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/jacob/env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']

so I run apt-get install python3-venv

but get the errors

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

Can anyone help with this?

like image 862
Gomenburu Avatar asked May 22 '26 07:05

Gomenburu


1 Answers

It is:

sudo apt-get install python3-venv
like image 54
Krunal Akbari Avatar answered May 24 '26 22:05

Krunal Akbari