亲测只能使用python2.7版本来安装redash

2018/1/12 posted in  python

安装npm

apt-get install nodejs
apt-get install npm

#如果不执行这个会报错
apt-get install nodejs-legacy

安装redis


安装postgresql

安装问题

Successfully built gspread impyla MySQL-python oauth2client pyhive pymongo vertica-python dql sasl thrift thrift-sasl cassandra-driver memsql uritemplate future msgpack-python wraptor
Installing collected packages: uritemplate, pyasn1, pyasn1-modules, rsa, oauth2client, google-api-python-client, gspread, thrift, impyla, influxdb, MySQL-python, future, pyhive, pymongo, pyOpenSSL, vertica-python, urllib3, msgpack-python, td-client, pymssql, jmespath, docutils, botocore, dynamo3, pyparsing, dql, sasl, thrift-sasl, futures, cassandra-driver, wraptor, memsql, atsd-client, simple-salesforce, s3transfer, boto3, monotonic, tenacity, PyAthena, certifi
Found existing installation: pyOpenSSL 17.5.0
Uninstalling pyOpenSSL-17.5.0:
Successfully uninstalled pyOpenSSL-17.5.0
Successfully installed MySQL-python-1.2.5 PyAthena-1.2.1 atsd-client-2.0.12 boto3-1.5.26 botocore-1.5.72 cassandra-driver-3.11.0 certifi-2018.1.18 docutils-0.14 dql-0.5.24 dynamo3-0.4.7 future-0.16.0 futures-3.2.0 google-api-python-client-1.5.1 gspread-0.6.2 impyla-0.10.0 influxdb-2.7.1 jmespath-0.9.3 memsql-2.16.0 monotonic-1.4 msgpack-python-0.4.8 oauth2client-3.0.0 pyOpenSSL-16.2.0 pyasn1-0.4.2 pyasn1-modules-0.2.1 pyhive-0.3.0 pymongo-3.2.1 pymssql-2.1.3 pyparsing-2.1.4 rsa-3.4.2 s3transfer-0.1.12 sasl-0.2.1 simple-salesforce-0.72.2 td-client-0.8.0 tenacity-4.8.0 thrift-0.11.0 thrift-sasl-0.3.0 uritemplate-0.6 urllib3-1.22 vertica-python-0.5.1 wraptor-0.6.0
Traceback (most recent call last):
File "/opt/redash/redash.3.0.0.b3134/manage.py", line 6, in
from redash.cli import manager
File "/opt/redash/redash.3.0.0.b3134/redash/__init__.py", line 5, in
import redis
ImportError: No module named redis

需要安装

(redashenv) root@williiiam-dev:/opt/redash/redash/setup/ubuntu# pip install redispy
Collecting redispy
Downloading redispy-3.0.0-py2.py3-none-any.whl (64kB)
100% |████████████████████████████████| 71kB 177kB/s
Installing collected packages: redispy
Successfully installed redispy-3.0.0

解决方案

在requirements.txt中增加引入 redispy==3.0.0