Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the usage and installation of packages in Python

Shulou Source: shulou.com Published: 2022-06-02 22:42:08 10月06日 Update

What this article shares with you is about the usage and installation of the package in Python. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

This paper introduces the functions and installation methods of some common packages in Python. I hope it will be helpful for friends in Python to learn!

Basic uses and installation methods of some packages in Python

Pika can be used to connect to RabbitMQ

Pip install pika-I http://pypi.douban.com/simple/-- trusted-host pypi.douban.com

Requests is the HTTP library

Request supports HTTP connection persistence and connection pooling, session persistence using cookie, file upload, automatic response to content encoding, and automatic encoding of internationalized URL and POST data.

Pip install requests-I http://pypi.douban.com/simple/-- trusted-host pypi.douban.com

SQLAlchemy is the ORM framework

Pip install SQLAlchemy-I http://pypi.douban.com/simple/-- trusted-host pypi.douban.com

Pymongo is the library that connects to mongodb

Pip install pymongo-I http://pypi.douban.com/simple/-- trusted-host pypi.douban.com

MySQL-python is the library that connects to mysql

Apt-get install python-mysqldb

Gearman distributed task system

Pip install gearman-I http://pypi.douban.com/simple/-- trusted-host pypi.douban.com

Lxml is a parsing library of python, which supports parsing of HTML and XML.

Pip install lxml-I http://pypi.douban.com/simple/-- trusted-host pypi.douban.com

Elasticsearch library, client library of es

Pip install elasticsearch-I http://pypi.douban.com/simple/-- trusted-host pypi.douban.com

Pycurl is the curl library

Pip install pycurl-I http://pypi.douban.com/simple/-- trusted-host pypi.douban.com

Error

_ _ main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory

Apt-get install libcurl4-openssl-dev

The above is the usage and installation of the package in Python. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Support package method more knowledge article coding learning utility task task system role content distributed international client client that is work meeting common Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Information Xiaomi Huawei Docker