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的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Qt5应用改变窗口大小时出现黑影
- 下一篇: mysql查询条件字段值末尾有空格的问题