[Python3 网络爬虫开发实战] 1.5.3-redis-py 的安装 | 珊瑚贝

对于 Redis 来说,我们要使用 redis-py 库来与其交互,这里就来介绍一下它的安装方法。

1. 相关链接

2. pip 安装

这里推荐使用 pip 安装,命令如下:

1
pip3 install redis

运行完毕之后,即可完成 redis-py 的安装。

3. 验证安装

为了验证 redis-py 库是否已经安装成功,可以在命令行下测试一下:

1
2
3
4
5
$ python3
>>> import redis
>>> redis.VERSION
(2, 10, 5)
>>>

如果成功输出了其版本内容,那么证明成功安装了 redis-py。

来源:https://cuiqingcai.com/5233.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_11490.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?