Getting started with Python: how to use a third-party library ?, Python entry third-party library
This is the first article on Python and the last article on the introduction to "programming tips for beginners of Python 13th". It mainly introduces how to use a third-party library.
1. Third-party Libraries
Python is equivalent to a mobile phone, and a third-party library is equivalent to a variety of apps on mobile phones.
When we want to build a website, we can select a fully functional Django, simple Flask, and other web frameworks. When we want to create a crawler, we can use the Scrapy framework; when we want to do data analysis, we can choose Pandas data framework and so on. These are some very mature third-party libraries.
Then, how can we find the corresponding library based on our own needs?
You can find the desired library on the https://awesome-python.com website by category.
2. install third-party Libraries
This section describes how to install a third-party library in PyCharm.
1) Open PyCharm -- top menu File -- select Default Settings;
2) Search for project interpreter, select the current Python environment, and click "+" at the bottom to add a library;
3) Search for the database name -- select the database and click Install Package at the bottom. After the installation is successful, a message is displayed, indicating that the database is successfully installed. You can return to the previous Project Interpreter to view the installed database, click "-" To unmount unnecessary databases.
3. Use a third-party library
When using a third-party library, you only need to input the library in PyCharm. The input database uses import. For example, the input database requests is import requests.
The first-stage basic knowledge about Python is generally here, and the second-stage sharing will focus on Python crawlers.
Operating Environment: Python version, 3.6; PyCharm version, 2016.2; Computer: Mac
----- End -----
Author: du wangdan, Public Account: du wangdan, Internet product manager.