Python如何正确使用和安装各类包?
- 内容介绍
- 文章标签
- 相关推荐
本文共计341个文字,预计阅读时间需要2分钟。
本文介绍了Python中一些常见包的作用和安装方法,希望对学习Python的朋友有所帮助!
Python中的一些基本包及其作用和安装方法如下:
1. `pika`:用于连接RabbitMQ的Python库。 安装方法:`pip install pika -i http://pypi.douban.com/`
(注:以上内容已简化,符合字数要求。)
本篇文章介绍了Python中一些常见的包的作用和安装方法,希望对学习Python中的朋友有帮助!
Python中一些包的基本用处和安装方法
pika可以用来连接RabbitMQ
pip install pika -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
requests是HTTP库
Request支持HTTP连接保持和连接池,支持使用cookie保持会话,支持文件上传,支持自动响应内容的编码,支持国际化的URL和POST数据自动编码。
pip install requests -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
SQLAlchemy是ORM框架
pip install SQLAlchemy -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
pymongo是连接mongodb的库
pip install pymongo -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
MySQL-python是连接mysql的库
apt-get install python-mysqldb
gearman分布式任务系统
pip install gearman -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
lxml是python的一个解析库,支持HTML和XML的解析
pip install lxml -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
elasticsearch库,es的客户端库
pip install elasticsearch -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
pycurl是curl库
pip install pycurl -i 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中一些包的基本用处和安装方法的详细内容,如果大家有任何补充可以联系易盾网络小编。
本文共计341个文字,预计阅读时间需要2分钟。
本文介绍了Python中一些常见包的作用和安装方法,希望对学习Python的朋友有所帮助!
Python中的一些基本包及其作用和安装方法如下:
1. `pika`:用于连接RabbitMQ的Python库。 安装方法:`pip install pika -i http://pypi.douban.com/`
(注:以上内容已简化,符合字数要求。)
本篇文章介绍了Python中一些常见的包的作用和安装方法,希望对学习Python中的朋友有帮助!
Python中一些包的基本用处和安装方法
pika可以用来连接RabbitMQ
pip install pika -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
requests是HTTP库
Request支持HTTP连接保持和连接池,支持使用cookie保持会话,支持文件上传,支持自动响应内容的编码,支持国际化的URL和POST数据自动编码。
pip install requests -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
SQLAlchemy是ORM框架
pip install SQLAlchemy -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
pymongo是连接mongodb的库
pip install pymongo -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
MySQL-python是连接mysql的库
apt-get install python-mysqldb
gearman分布式任务系统
pip install gearman -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
lxml是python的一个解析库,支持HTML和XML的解析
pip install lxml -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
elasticsearch库,es的客户端库
pip install elasticsearch -i pypi.douban.com/simple/ --trusted-host pypi.douban.com
pycurl是curl库
pip install pycurl -i 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中一些包的基本用处和安装方法的详细内容,如果大家有任何补充可以联系易盾网络小编。

