In daily work, you will need to install or uninstall Python modules. So I sorted it out. The following article mainly introduces the relevant information about python installation/uninstallation modules. The introduction is very detailed through pictures and texts. Friends who need it can For reference
Take the pygame module as an example
1. Import via pycharm
(1) Just click install package pygame directly
The installation is correct if the following conditions occur
If there is an error, you can try to upgrade the pip file to the latest
(2) Install through python interpreter
Steps: File-Setting-python interprete
click the plus sign
After searching for the pygame module, click install Package
The installation is correct if the following conditions occur
(3) Uninstall
Also select the module to be deleted in Python Interpreter and click the minus sign
When this happens, the uninstallation is complete
2. Install via pip in the terminal
(1) installation
Install modules through instructions pip install pygame
, more instructions can be Baidu (specified path, specified version, specified download source)
If this happens, the installation is successful
If you re-enter pycharm, you can use this module
(2) Uninstall
pip uninstall pygame
Uninstall the module by command
In this case, the uninstallation is successful
3. Install through a third-party python library
Website address:
https://www.lfd.uci.edu/~gohlke/pythonlibs/
My computer is 64-bit and I use a python3.7 interpreter (consistent with cp37)
Find the file you want to install and download it (it may take a long time)
Put this file in the python environment path
Can't find path to find hidden items in settings
(1) Install wheel on the computer first
1 |
|
If the wheel file cannot be installed, update the pip file
1 |
|
(2) Paste the whl file to find this folder (this folder is your own python environment variable path)
1 |
|
(3) Use the following command in the terminal to enter this folder
1 |
|
(4) Then install this file
1 |
|
Enter pycharm again and you will find that the pygame package is available
(5) Uninstall
1 |
|
The deletion is complete as shown below
Summarize
This is the end of this article about the python installation/uninstallation module method.