All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- 🐛 修复可编辑安装包(editable install)导致卸载失败的问题
pip freeze输出中的-e行会导致pip uninstall -r报错- 现在将可编辑包与常规包分离,分别处理
- 可编辑包通过
pip list --editable --format=freeze获取包名后逐个卸载 - 常规包仍通过
-r批量卸载
- 包列表展示时区分显示常规包和可编辑安装的包
- 改进临时文件清理,所有路径都使用
>nul 2>&1抑制错误
- 🐍 Multi-Python Version Detection and Selection
- Automatically detects all Python installations using both
where pythonand Python Launcher (py -0p) - Allows users to select which Python version to reset when operating on global environment
- Automatic deduplication of detected Python paths
- Single-version auto-selection when only one Python installation is found
- Automatically detects all Python installations using both
- ✨ Enhanced global environment workflow with version selection
- 🔧 Enabled delayed variable expansion for improved script reliability
- All
pythonandpipcommands now use the selected Python version - Improved script robustness with consistent use of delayed expansion variables
- Enhanced Python path extraction from
py -0poutput
- Added
:SelectPythonVersionsubroutine for multi-version detection - Added
:CheckDuplicatesubroutine for removing duplicate Python paths - Modified all pip operations to use
python -m pipfor version-specific execution - Introduced
SELECTED_PYTHONvariable to track the chosen Python interpreter
- 🎉 Initial release of Python Environment Reset Tool
- ✨ Automatic virtual environment detection (
.venv,venv,env,.env) - 🛡️ Safety warnings for global Python environment operations
- 📦 Complete package uninstallation with user confirmation
- 🔧 Automatic base packages installation (pip, setuptools, wheel)
- 🌐 Full UTF-8 support for international characters
- 📝 Clear and informative console output
⚠️ Error handling and validation- 🎯 User-friendly prompts and confirmations
- 📋 Display of current Python environment and installed packages
- 💡 Helpful hints for requirements.txt installation
- Detects and activates virtual environments automatically
- Lists all installed packages before uninstallation
- Requires explicit confirmation before destructive operations
- Upgrades pip to the latest version
- Installs essential build tools (setuptools, wheel)
- Shows final package list after reset
- Provides guidance for next steps
- Strong warnings when operating on global Python environment
- Requires typing "YES" in uppercase for global environment operations
- Multiple confirmation steps to prevent accidental data loss
This is the first stable release of the Python Environment Reset Tool! 🎊
Key Highlights:
- Simple one-click solution to reset your Python virtual environment
- Smart detection of common virtual environment folder names
- Safety-first approach with multiple warnings and confirmations
- Clean, professional console interface with UTF-8 support
- Automatic reinstallation of essential Python packages
Perfect for:
- Developers who need to clean up their virtual environments
- Troubleshooting package conflicts
- Starting fresh with a clean Python environment
- Testing package installations
Getting Started:
- Download
env-reset.bat - Place it in your project directory
- Double-click to run
- Follow the prompts
Thank you for using Python Environment Reset Tool! 🐍✨