pip command example
正常安装:pip install [包名]
The following is a summary of some basic knowledge and questions about the pip install process
1. Download the specified version of the extension library without installing it
pip download [包名] [==版本]
2. List all modules currently installed
pip list
3. Install the specified version of the module online
pip install [包名][==version]
4. Upgrade package module
pip install --upgrade [包名]
5. Uninstall the specified version of the package
pip uninstall [包名][==version]
6. If you want to install the same python package module as your classmates, you can do this
Execute the (migrate module) command in the terminal
pip freeze [> requirements.txt]
Generate requirements.txt (document name randomly named) file under user name
Then put the file in the path displayed on the terminal you opened
Execute the command to complete the installation
pip install -r requirements.txt
When you are installing the module, the following message appears
You should enter the root directory to install (change to ./pip install [package name] to install)
If the online installation fails, you can download the compiled whl file from the http://www.lfd.uci.edu/~gohlke/pythonlibs/ extension library, and then use the pip command to install it.
Tip: Put the whl file in that path, open the terminal in that path, and execute the pip command
If access is denied during the installation of the package, you can install it as an administrator
You can also install it with the command
pip install [包名] --user