A Python utility for managing virtual environments using the standard venv
library for Linux users. This lightweight tool simplifies the creation, removal, and management of Python virtual environments. Its a wrapper around venv, witch manages venv access and locations.
- Create and manage isolated Python environments
- Simple command-line interface
- Built with standard library components
- Minimal dependencies (only requires
tomllib
)
Clone the repository:
git clone <repository-url>
cd pyenv
chmod +x ./install.sh
sudo ./install.sh
During installation you will be prompted for:
- Binary location (e.g., /usr/local/bin/pyenv)
- Virtual environments storage location (e.g., /home/user/.pyenvs)
The script will:
- Check for Python 3 installation
- Create necessary directories (optional)
- Set up the executable script
- Offer to add required paths to .bashrc
After installation:
source ~/.bashrc # or restart your terminal
The following commands are available:
# Create new environment
pyenv new myenv -
# Create a new environemt in a custom path and custom version
pyenv new myenv --version 3.9 --path /custom/path
# Remove environment
pyenv remove myenv
# List environments
pyenv list
# List environmets and filter after pattern
pyenv list --pattern "test.*"
- Python 3.x
- Linux
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Felix Schelling
GitHub: felixscode
Personal website: felixschelling.de
Written with ❤️ in the 🏔️