--- id: virtualenv-clone version: "0.5.7" license: MIT license_treatment: permissive maintenance: aging --- # virtualenv-clone — script to clone virtualenvs. License: permissive · Maintenance: aging · Downloads: 1.7M/mo ## What it is and what it does virtualenv-clone is a utility script that copies a Python virtualenv from one location to another while preserving its isolation and functionality. Unlike virtualenv's built-in `--relocatable` flag, which can break site-packages isolation and introduce issues with relative paths, this tool takes a more thorough approach: it copies the entire environment directory, updates hardcoded paths in the activate script, rewrites shebangs in bin scripts to point to the new Python interpreter, and scans sys.path to find and update any absolute references in .pth and .egg-link files that still point to the old location. The package is designed for developers who need to duplicate virtualenvs—for backup, migration, or testing purposes—without the pitfalls of the standard relocation mechanism. It has no runtime dependencies and installs with low friction, making it straightforward to add to any workflow. However, the codebase has not seen active development since 2021, so it may not account for changes in newer Python or virtualenv behavior. Use it for: - Back up a working virtualenv before making experimental changes to dependencies. - Migrate a virtualenv from one machine or filesystem to another while preserving all installed packages. - Clone a development environment for testing or sharing with team members. - Duplicate a production-like virtualenv for local debugging without affecting the original. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Clones an existing Python virtualenv to a new location, updating shebangs, paths, and environment variables to work correctly in the new location without breaking isolation. Yes, if you need to copy a virtualenv and the aging codebase is not a concern for your Python version and use case. The package is lightweight, has no dependencies, and solves a real problem that the standard virtualenv tools do not. However, verify compatibility with your specific Python version and virtualenv setup before relying on it in production, given the lack of recent updates. ## Install pip install virtualenv-clone uv add virtualenv-clone poetry add virtualenv-clone ## Installing virtualenv-clone Before you install: Low install friction with no runtime dependencies. Maintenance is aging—last release was in 2021 and the repository has not been updated since May 2025, though it remains active and unarchived. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install virtualenv-clone python -m virtualenv_clone /path/to/old/venv /path/to/new/venv Requires Python 2.7 or 3.4+; the clone operation modifies shebangs and .pth files in the target virtualenv, so ensure the source virtualenv is not in use during cloning. Verify before relying: - Whether the package works correctly with modern virtualenv versions and current Python patch releases. - Whether the aging codebase handles edge cases in recent Python or setuptools changes. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 1.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags clone virtualenv, copy virtualenv to new location, virtualenv relocation, duplicate python environment, virtualenv migration, copy virtual environment, virtualenv backup, virtualenv-management, environment-cloning [View on SkillFed](https://skillfed.io/packages/virtualenv-clone) · [View on PyPI](https://pypi.org/project/virtualenv-clone/)