1.直接安装pip install apache-superset
容易出现错误,可以先安装以下两个依赖库:
python_geohash-0.8.5-cp37-cp37m-win_amd64.whl
sasl-0.2.1-cp37-cp37m-win_amd64.whl
大家自行到https://www.lfd.uci.edu/~gohlke/pythonlibs
下载
2.连接mysql数据库的时候报错
可以先安装依赖库:pip install mysqlclient
3.Sql查询的时候报以下错误 Database error Instance <Query at 0x17926600e88> is not bound to a Session
Database error
Instance <Query at 0x17926600e88> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: http://sqlalche.me/e/13/bhk3)
可以找到 环境中这个目录下 superset\Lib\site-packages\superset\utils
的core.py文件,修改对应代码块:(大概在727到745行)
def __enter__(self) -> None:
try:
if threading.current_thread() == threading.main_thread():
# signal.signal(signal.SIGALRM, self.handle_timeout)
# signal.alarm(self.seconds)
pass
except ValueError as ex:
logger.warning("timeout can't be used in the current context")
logger.exception(ex)
def __exit__( # pylint: disable=redefined-outer-name,unused-variable,redefined-builtin
self, type: Any, value: Any, traceback: TracebackType
) -> None:
try:
# signal.alarm(0)
pass
except ValueError as ex:
logger.warning("timeout can't be used in the current context")
logger.exception(ex)