0

[I uninstalled Ubuntu 18.04LTS and installed Ubuntu 20.04LTS on windows 10 but it is not working correctly with python3 -m venv env when I create a virtual environment, also it does not work with already created environments error is ```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: ['/mnt/e/CS50/web/practice/test/env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']```]

1
  • 1
    You forgot to use 'sudo' – user535733 May 3 '20 at 15:30
0

Pretty obvious but have you tried sudo?

sudo apt-get install python3-venv

enter image description here

3
  • Thanks now the virtual environment is not being created, can you tell me what's wrong with it – Ali May 3 '20 at 15:56
  • "X didn't work" is much too vague to offer advice upon, and not related to the lack of 'sudo' that is your original question. AskUbuntu is a Question/Answer site not an interactive forum. Please open a detailed new question about your current problem. – user535733 May 3 '20 at 16:25
  • I can't get much information out of your comment, nevertheless I've seen your edit and perhaps you could try to reinstall venv {sudo apt-get reinstall python-venv} and then recreate the virtual environment {rm -rf venv} and then {sudo apt install python3.8-venv} – Santiago May 4 '20 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.