Skip to main content

A command-line tool for managing Python virtual environments

Project description

QVenv - Python Virtual Environment Manager

A command-line tool for managing Python virtual environments with automatic requirements detection and installation.

Features

  • Automatic Python version detection
  • Requirements file detection and installation (requirements.txt, requirements.pip)
  • Cross-platform support (Windows, macOS, Linux)
  • Environment activation helpers
  • Environment recreation and rebuilding
  • Timestamped logging

Installation

Run the installation script to create a global symlink:

git clone https://github.com/GriffinCanCode/QVenv.git
cd QVenv
./install.sh

The script will automatically:

  • Make qvenv.py executable
  • Create a symlink in /usr/local/bin or ~/.local/bin
  • Provide instructions if PATH configuration is needed

Manual Installation

chmod +x qvenv.py
ln -s "$(pwd)/qvenv.py" /usr/local/bin/qvenv

Usage

Commands

qvenv make [path] Create a new virtual environment.

qvenv make                    # Creates ./venv
qvenv make myenv              # Creates ./myenv
qvenv make myenv -f           # Force recreate if exists
qvenv make myenv --complete   # Create and install requirements

qvenv activate Display activation instructions for the nearest virtual environment.

qvenv activate

qvenv deactivate Display deactivation instructions.

qvenv deactivate

qvenv install Install requirements from requirements.txt or requirements.pip into the existing virtual environment.

qvenv install

qvenv build Alias for qvenv install. Installs requirements into the existing virtual environment.

qvenv build

qvenv remake Remove and recreate the virtual environment with fresh packages from requirements file.

qvenv remake

Options

make command options:

  • path - Path for the virtual environment (default: venv)
  • -f, --force - Force recreation if environment already exists
  • --complete - Detect and install requirements after creation

Typical Workflow

# Create a new virtual environment
qvenv make

# Activate it (copy and run the command shown)
source venv/bin/activate

# Install dependencies
qvenv install

# Later, rebuild environment if needed
qvenv remake

Requirements Detection

The tool searches for requirements files in this order:

  1. requirements.txt
  2. requirements.pip

The first available file will be used for package installation.

Platform Support

Unix and macOS

  • Uses python3 by default
  • Activation: source venv/bin/activate
  • Symlink location: /usr/local/bin/qvenv or ~/.local/bin/qvenv

Windows

  • Falls back to python if python3 is unavailable
  • Activation: venv\Scripts\activate
  • Manual PATH configuration may be required

Prerequisites

  • Python 3.6 or higher
  • Python venv module (typically included with Python)
  • Write permissions for the target directory

Troubleshooting

Python venv module not available

python3 -m pip install --user virtualenv

Permission denied during installation

sudo ./install.sh

Or manually specify a user directory:

ln -s "$(pwd)/qvenv.py" "$HOME/.local/bin/qvenv"
export PATH="$PATH:$HOME/.local/bin"

Virtual environment not found

Ensure you're in a directory containing one of these:

  • .venv
  • venv
  • .env
  • env
  • virtualenv
  • .virtualenv

Contributing

Contributions are welcome. Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/feature-name)
  3. Commit your changes (git commit -m 'Add feature')
  4. Push to the branch (git push origin feature/feature-name)
  5. Open a Pull Request

License

This project is licensed under the Griffin License. See the LICENSE file for details.

Related Tools

Part of the GSuite collection of development tools.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qvenv-1.0.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qvenv-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file qvenv-1.0.0.tar.gz.

File metadata

  • Download URL: qvenv-1.0.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for qvenv-1.0.0.tar.gz
Algorithm Hash digest
SHA256 26883a24ba7d38081c12571ffcd640e4f66263715484574fc8242ead570fe143
MD5 02d57fd6fde216aad78740ae13e380dc
BLAKE2b-256 238e18d1c2a3d1752bc243980df8756e6d2665be61e4a042c9c73cd1bbbe82b4

See more details on using hashes here.

File details

Details for the file qvenv-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: qvenv-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for qvenv-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c48e1d9b940660bc2b08a661088538ae91c145089678ca4f3b3d818d94aa25a
MD5 64407db56f143ce8b770ad0451ef2b66
BLAKE2b-256 444c6b6f80b781bcd1464cbbc3d9b7d275c912705db541f316c680393c3b0868

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page