如何在Python項目中使用包?針對這個問題,這篇文章詳細介紹了相對應的分析和解答,希望可以幫助更多想解決這個問題的小伙伴找到更簡單易行的方法。

Python中一些包的基本用處和安裝方法
pika可以用來連接RabbitMQ
pip install pika -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
requests是HTTP庫
Request支持HTTP連接保持和連接池,支持使用cookie保持會話,支持文件上傳,支持自動響應內容的編碼,支持國際化的URL和POST數據自動編碼。
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分布式任務系統
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項目中使用包問題的解答就分享到這里了,希望以上內容可以對大家有一定的幫助,如果你還有很多疑惑沒有解開,可以關注創新互聯行業資訊頻道了解更多相關知識。
網站欄目:如何在Python項目中使用包-創新互聯
文章鏈接:http://www.js-pz168.com/article10/cohhgo.html
成都網站建設公司_創新互聯,為您提供云服務器、網頁設計公司、標簽優化、外貿網站建設、軟件開發、App設計
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯