The first step: open pycharm: File-Settings
Step 2: Project: (your project name)-Project InterPreter-click the plus sign on the right
Step 3: Search for the dependency to download in the window-select and click install package in the lower left corner to import the dependency package
Content expansion:
Python import and export dependent package commands
The program must include a requirements.txt file to record all dependent packages and their precise version numbers. If you want to regenerate the virtual environment on another computer, the importance of this file is reflected, such as the computer used when deploying the program. pip can use the following command to automatically generate this file
pip freeze requirements.txt
If you want to create a complete copy of this virtual environment, you can create a new virtual environment and run the following commands on it:
pip install -r requirements.txt
Recommended Posts