建立个人数据分析平台

创建虚拟环境

conda create -n superset python=3.6 anaconda

后面加上anaconda,可以不用重复安装原有依赖包

激活

source activate superset

如果要退出,就用

source deactivate superset

安装

pip install superset -i https://pypi.douban.com/simple

安装后验证

(superset) macdeMacBook-Air-2% conda list | grep superset
# packages in environment at /Users/Hank/opt/anaconda3/envs/superset:
superset                  0.30.1                   pypi_0    pypi

进入安装包

cd D:\Anaconda3\Lib\site-packages\superset
cd bin
python superset
fabmanager create-admin --app superset
python superset db upgrade
python superset load_examples
python superset init
python superset runserver -d

可能报错:

问题一:

No PIL installation found

INFO:superset.utils.screenshots:No PIL installation found

解决:

pip install pillow

问题二:

/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/flask_caching/init.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled."Flask-Caching: CACHE_TYPE is set to null, "

解决:
修改对应的文件/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/flask_caching/init.py183行

config.setdefault(“CACHE_TYPE”, “CACHE_NO_NULL_WARNING”)

问题三:

ModuleNotFoundError: No module named 'MySQLdb'

解决:

pip install mysqlclient

问题五:

NameError: name '_mysql' is not defined

问题六:

Error: No such command 'fab'.

解决:

superset fab create-admin
fabmanager is going to be deprecated in 2.2.X, you can use the same commands on the improved 'flask fab <command>'
posted @ 2020-08-28 18:06  hank-li  阅读(390)  评论(0编辑  收藏  举报