Create a virtual environment, install multiple libraries at once
Pip Freeze > Requirements.txt (the name of the library is all inside)
Generate Requirements.txt file
Use in another environment
Pip Install-r requirements.txt
PIP3 Install Virtualenv
The first step is to create the directory:
mkdir MyProject
CD myproject/
The second step is to create a separate Python runtime environment named venv:
Virtualenv--no-site-packages venv
Enter the environment:
SOURCE Venv/bin/activate
Installation package:
Cp-f ~/downloads/requirements.txt./
Pip Install-r requirements.txt
Pip Install JINJA2
Exit:
Deactivate
How does virtualenv create a "stand-alone" Python runtime environment? The principle is simple, is to copy the system Python to virtualenv environment, with command source Venv/bin/activate into a virtualenv environment, Virtualenv The relevant environment variables are modified so that both command Python and Pip Point to the current virtualenv environment.
Pycharm Activation Code
Http://idea.liyang.io
Requirements.txt:
backports-abc==0.5
beautifulsoup4==4.5.3 ...
Use of Python, Pycharm, virtualenv