Take the pygame module for example
1, import via pycharm
(1) Just click on install package pygame directly
Installation is correct if the following occurs
If you get an error try upgrading the pip file to the latest one
(2) Installation via python interpreter
Steps: File-Setting-python interprete
Click on the plus sign
Search for the pygame module and click on install Package.
Installation is correct if the following occurs
(3) Uninstallation
Again in Python Interpreter select the module you want to remove by clicking on the minus sign
In this case, uninstallation is complete
2, install via pip in the terminal
(1) Installation
by means of a directivepip install pygame
Installation module, more instructions can be Baidu (specify the path, specify the version, specify the download source)
If this happens, the installation was successful
Re-entering pycharm allows you to use this module
(2) Unloading
by means of a directivepip uninstall pygame
Uninstallation Module
The uninstallation is successful if it looks like this
3. Installation via third-party python libraries
Website address:
/~gohlke/pythonlibs/
My computer is 64 bit and I'm using python 3.7 interpreter (in line with cp37)
Find the file you want to install and download it (it may take a bit longer)
Put this file in the python environment path
Unable to find path to find hidden items in settings
(1) Install wheel on your computer first.
pip install wheel
If the wheel file doesn't install, update the pip file
python -m pip install --upgrade pip
(2) Paste the whl file to find this folder (this folder is your own python environment variable path)
C:\Users\16660\AppData\Local\Programs\Python\Python37\Lib\site-packages
(3) Use the following command in the terminal to go to this folder
cd C:\Users\16660\AppData\Local\Programs\Python\Python37\Lib\site-packages
(4) Then install this file
pip install pygame-2.0.3-cp37-cp37m-win_amd64.whl
Go into pycharm again and you'll see that the pygame package is available!
(5) Uninstallation
pip uninstall pygame-2.0.3-cp37-cp37m-win_amd64.whl
If the following message appears, the deletion is complete
summarize
to this article on python install/uninstall module method is introduced to this article, more related python install/uninstall module content, please search for my previous articles or continue to browse the following related articles I hope you will support me in the future!