本篇文章介紹了Python中一些常見的包的作用和安裝方法,希望對學習Python中的朋友有幫助!
Python中一些包的基本用處和安裝方法
pika可以用來連接RabbitMQ
pip install pika -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
requests是HTTP庫
Request支持HTTP連接保持和連接池,支持使用cookie保持會話,支持文件上傳,支持自動響應內(nèi)容的編碼,支持國際化的URL和POST數(shù)據(jù)自動編碼。
pip install requests -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
SQLAlchemy是ORM框架
pip install SQLAlchemy -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pymongo是連接mongodb的庫
pip install pymongo -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
MySQL-python是連接mysql的庫
apt-get install python-mysqldb
gearman分布式任務系統(tǒng)
pip install gearman -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
lxml是python的一個解析庫,支持HTML和XML的解析
pip install lxml -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
elasticsearch庫,es的客戶端庫
pip install elasticsearch -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pycurl是curl庫
pip install pycurl -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
報錯
__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory
apt-get install libcurl4-openssl-dev
以上就是Python中一些包的基本用處和安裝方法的詳細內(nèi)容,如果大家有任何補充可以聯(lián)系武林站長站小編。
|
新聞熱點
疑難解答