By default, when we write Python programs locally, some third-party libraries are not installed by default. Here, we need to install the required library locally. Of course, we can install it through pip or directly using PyCharm IED editor.
Here we open File Setting in PyCharm editor.
Then find the Python Interpreter of our project. Then you can see the+sign on the right to add libraries.
Here we can directly search the database name to install it.
PS: Of course, some cannot be installed due to network problems. If it cannot be installed here, we can use pip to install it.
Source: Lao Jiang Tribe » How does PyCharm install libraries? Graphic and text recording the process of PyCharm installing third-party libraries |Welcome to share (public account: Chiang's circle of friends)