When we use Python to develop, we generally use virtualenv to isolate the environment and prevent contamination of the local Python environment.
When we have multiple virtual environments, how to copy a virtual environment package to What about another environment?
1. Go to the scripts directory of the original virtualenv variable and export the version information of the packages installed in this environment
pip freeze > requirements.txt
2. Go to the new virtual environment, copy the requirements.txt file that is not exported to the scripts directory, and execute the installation command
pip install -r requirements.txt
The above is the detailed content of How to copy a virtual environment package to another environment?. For more information, please follow other related articles on the PHP Chinese website!