Earlier we learned about several commonly used built-in modules in Python. In this section we will learn how to install third-party modules .
Before installing third-party modules, we can check first to see which third-party modules have been installed in our computer. First, enter the cmd interface, shortcut entry method, press win+r in the lower left corner, then enter cmd and press Enter , enter the page below, and then enter pip list to view.
We can see that there are no redundant third-party modules in my list. Next, we download the third-party modules. The download command is:
pip install module name
Next we download a module called numpy , which is mostly used for scientific calculations.
When I download, the problem shown in the picture below appears:
That is to say, my pip version is too low and I need to update the pip version. Then we enter python -m pip install --upgrade pip to update pip. The update is as follows:
Then download and install the module.
This shows that the installation is successful, and then we introduce the numpy module into IDLE.
This shows that we have successfully installed and can use some functions in this module.
Installing third-party plug-ins in Pycharm is much simpler. We directly click the File key in the upper left corner of Pycharm, then find and open Settings inside, and enter the following page:
Then we can download the module and click the '+' button on the far right:
Click the button below until the installation is successful.
Regarding the installation and use of third-party modules, you can see that it is much more convenient to use Pycharm. You may encounter various error messages during the download and installation process. You can consult more information to solve the problem.