Article directory
Use of pip
1. Specific commands of pip
1. Check the usage of pip command:
pip --help
2. Check pip version
pip --version
3. Update pip version
python -m pip install --upgrade pip
2. Installation of pip library
1. Install a single library.
For example, to install the xyml library, open cmd and enter the following command:
pip install xyml
The general command is:
pip install library name
2. Install libraries in batches.
Create a new txt file, add the library name information in the file, and then enter pip install -r file path to install these libraries in batches. The command is:
pip install -r path name
path name format (for example, txt file under D drive): d:\xxx.txt
3. View pip library
1. View all installed libraries.
The command is:
pip list
2. View the details of the library
For example, to view the information of the xyml library, the command is:
pip show -f xyml
4. Uninstall the library
1. Uninstall a single library
1. Ask once before deleting the library to confirm whether to delete it.
For example, to uninstall the xyml library, open cmd and enter the following command:
pip uninstall xyml
2. Uninstall multiple libraries.
The method of batch uninstalling libraries is the same as the batch installation method of libraries.
For example, create a new xxx.txt under the D drive, and add the following library name content that you want to delete in the txt file.
The command is:
pip uninstall -y -r :\xxx.txt