Python Forum
Not able to set up a virtual environment with venv
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not able to set up a virtual environment with venv
#1
I am new to Python. While going through the tutorials, I came to know that we should set up a virtual environment before installing any Python packages. So I tried it. It is creating the new environment directory but I am getting the following error:

Error:
Command '['/home/mohanp/programming/python/environments/test_env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
When I run the 'source' command to activate this newly created environment, it does not work because there is nothing inside the bin folder of the newly created environment directory test_env.

How do I overcome this hurdle and get started with Python?

System Details:

System: Linux Mint 18
Python: 3.7.4

Many Thanks.
Reply


Messages In This Thread
Not able to set up a virtual environment with venv - by mohanp06 - Oct-24-2020, 06:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with creating folder and "virtual environment" AudunNilsen 1 248 Mar-21-2024, 04:41 AM
Last Post: deanhystad
  my venv is not loading njoki 1 261 Mar-20-2024, 10:41 AM
Last Post: snippsat
  Installing python packages in a virtual environment Led_Zeppelin 1 772 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  Understanding venv; How do I ensure my python script uses the environment every time? Calab 1 2,286 May-10-2023, 02:13 PM
Last Post: Calab
  Problem with virtual environment standenman 2 1,011 Feb-23-2023, 07:09 PM
Last Post: standenman
  Python venv and PIP version issue JanOlvegg 2 1,277 Feb-22-2023, 02:22 AM
Last Post: JanOlvegg
Question Virtual Environment (using VS Code) Ashcora 4 14,104 Feb-15-2023, 07:17 PM
Last Post: snippsat
  Visual Studio Code venv ibm_db error mesi1000 7 2,829 Nov-13-2022, 12:36 AM
Last Post: snippsat
  How do I link the virtual environment of that project to the 3.9.2 version of python? Bryant11 1 1,378 Feb-26-2022, 11:15 AM
Last Post: Larz60+
  Project structure with a virtual environment gdbengo 1 1,445 Jan-26-2022, 03:22 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020