Skip to content

A simple batch file to choose a python version and set up a venv on Windows

License

Notifications You must be signed in to change notification settings

MNeMoNiCuZ/venv_create

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Create Virtual Environment Scripts

This repository provides two batch scripts designed to simplify the creation and management of Python virtual environments on your system. With these scripts, you can quickly set up a new Python environment with just a few clicks, streamlining your development workflow.

venv_create.bat

A script that detects installed Python versions, allows custom naming of your virtual environment, offers an option to upgrade pip, and automatically places you inside the newly created environment.

How to Use:

  1. Download and Place the Script: Download venv_create.bat and place it in your desired directory.
  2. Run the Script: Double-click the script to execute. It will display available Python versions for selection. The default selection is 1.
  3. Name Your Environment: Enter a name for your virtual environment when prompted. The default name is venv.
  4. Upgrade pip (Optional): Choose whether to upgrade pip. The default option is Yes.
  5. Install requirements.txt (Optional): Choose whether to run a pip install -r requirements.txt command in your new venv. The default option is Yes.
  6. Access Your Environment: Upon completion, the script places you inside the virtual environment and creates an activate_venv script for re-entry in the future.

Screenshots:

image

Venv.Setup.mp4

venv_create_simple.bat

A streamlined version of the script for quick setup, skipping Python version selection and focusing on creating a virtual environment directly.

How to Use:

  1. Download and Place the Script: Obtain venv_create_simple.bat and place it in the target directory.
  2. Run the Script: Execute the script. You will be prompted to name your virtual environment, with a default option provided.
  3. Access Your Environment: The script will finalize the environment creation and provide an activate_venv script for easy access in the future.

Customizing Python Version:

To specify a Python version, edit line 10 of venv_create_simple.bat with your desired version.

Screenshot:

venv_create_simple.bat usage


By utilizing these scripts, developers can efficiently manage their Python environments, enhancing productivity and focusing more on development tasks.

About

A simple batch file to choose a python version and set up a venv on Windows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published