日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

Ubuntu上面安装Redis Python

發布時間:2025/3/15 Ubuntu 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Ubuntu上面安装Redis Python 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Ubuntu上面安裝Redis Python

1,下載redis源碼https://redis.io/download,下載地址:http://124.205.69.169/files/A0920000066BC41D/download.redis.io/releases/redis-4.0.8.tar.gz

2,在Ubuntu上面解壓 tar -xzf redis-4.0.8.tar.gz

cd redis-4.0.8

make '編譯Redis

sudo make install? ‘安裝Redis

redis-server redis.conf? '啟動Reids服務器?

3,python已經默認安裝了;

4,為Python安裝Redis客戶端

wget -q http://peak.telecommunity.com/dist/ez_setup.py

sudo python ez_setup.py

如果出現403 SSL is required,vi修改一下,把http修改為https

用easy_install 安裝redis , hiredis出現問題;

改用pip進行redis,hiredis安裝;

5,安裝pip

sudo apt-get install python-pip

6,使用pip安裝hiredis

sudo pip install hiredis

7,使用pip安裝redis失敗

8,安裝git

sudo apt-get install git

9,使用源碼安裝

學習了:http://blog.csdn.net/chosen0ne/article/details/7319807

git clone https://github.com/andymccurdy/redis-py.git??

cd redis-py/

sudo python setup.py install

安裝完畢

10,安裝后測試

python

>>> import redis

>>>conn=redis.Redis()

>>>conn.set('hello','world')

True

>>>conn.get('hello')

'world'

?

轉載于:https://www.cnblogs.com/stono/p/8462440.html

總結

以上是生活随笔為你收集整理的Ubuntu上面安装Redis Python的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。