安装redis-rdb-tools
1.安装Python环境。推荐python3.6+
2.安装rdbtools
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple rdbtools
安装到这一步,已经可以用了,只不过解析比较慢。
3.安装python-lzf (可选,安装后会大幅度增加解析速度), windows的用户在这步会报错,下面有解决方案
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple python-lzf
-
安装redis-py (可选,不装的话,redis-memory-for-key命令不能用),个人感觉不需要安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple redis-py
windows安装python-lzf报错解决方案
报错信息:error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting python-lzf
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e3/33/b8f67bbe695ccc39f868ae55378993a7bde1357a0567803a80467c8ce1a4/python-lzf-0.2.4.tar.gz
Installing collected packages: python-lzf
Running setup.py install for python-lzf ... error
Complete output from command d:\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\92463\\AppData\\Local\\Temp\\pip-install-p0qoy9m9\\python-lzf\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\92463\AppData\Local\Temp\pip-record-y8rqxx8i\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'lzf' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
到下面网站下载系统对应的whl文件:
https://www.lfd.uci.edu/~gohlke/pythonlibs/
找到如下列表下载:
Python-lzf, bindings to the liblzf library.
python_lzf‑0.2.4‑cp27‑cp27m‑win32.whl
python_lzf‑0.2.4‑cp27‑cp27m‑win_amd64.whl
python_lzf‑0.2.4‑cp35‑cp35m‑win32.whl
python_lzf‑0.2.4‑cp35‑cp35m‑win_amd64.whl
python_lzf‑0.2.4‑cp36‑cp36m‑win32.whl
python_lzf‑0.2.4‑cp36‑cp36m‑win_amd64.whl
python_lzf‑0.2.4‑cp37‑cp37m‑win32.whl
python_lzf‑0.2.4‑cp37‑cp37m‑win_amd64.whl
python_lzf‑0.2.4‑cp38‑cp38‑win32.whl
python_lzf‑0.2.4‑cp38‑cp38‑win_amd64.whl
下载好后安装:
pip install python_lzf-0.2.4-cp37-cp37m-win_amd64.whl