Sometimes, we want to duplicate virtualenv with Python.
In this article, we’ll look at how to duplicate virtualenv with Python.
How to duplicate virtualenv with Python?
To duplicate virtualenv with Python, we can generate a requirements file.
To do this, we run
pip freeze > requirements.txt
to record the package in the virtualenv into requirements.txt.
Then when we create a new virtualenv, we run
pip install -r requirements.txt
to install the packages from requirements.txt.
Conclusion
To duplicate virtualenv with Python, we can generate a requirements file.