在Windows 10 下安装 Superset 的参考步骤
我是已经安装好的 Anaconda 的,所以接下来就直接创建虚拟环境了
1、用coda命令来创建虚拟环境:conda create -n superset python=3.7
2、**虚拟环境:activate superset
3、安装cryptography :pip install cryptography
4、更新setuptools 和 pip :pip install --upgrade setuptools pip
5、安装 superset:pip install superset
注:若超时,可使用阿里巴巴的开源数据源: https://mirrors.aliyun.com/pypi/simple/ ;
如:pip install superset -i https://mirrors.aliyun.com/pypi/simple/
6、安装 supset 后,可以用 pip 命令先安装,建议指定上面的数据源,这样会比较快 :flask、wtforms_json、flask_appbuilder、flask_compress、flask_migrate、flask_talisman、flask_caching、email_validator、celery、sqlparse、bleach、markdown、numpy、pandas(版本:0.23.4)、pathlib2、simplejson、humanize、polyline、geopy、backoff、pyarrow、croniter、retry、isodate、SQLAlchemy、SQLAlchemy(版本1.2)
5、升级数据库:python superset db upgrade
注:执行此步骤时,可以cd /d 目录 :进入安装superset的安装目录下输入再输入此命令:比如我的就先进入到:F:\Anaconda3\envs\superset\Lib\site-packages\superset\bin 后再执行此命令
6、创建管理员账号 :fabmanager create-admin --app superset
6、载入案例数据(若载入不成功,可跳过此步骤):python superset load_examples
7、初始化数据库:python superset init
8、启动服务:python superset run
启动成功后会在cmd里打印:Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
接下来可以在浏览器输入:http://127.0.0.1:5000/,然后输入刚才创建的管理员账号即可登录进去了
注:若想在启动时指定端口 8088 :python superset run -p 8088
登录后就是这样的:
以上步骤仅供参考,希望你可以安装成功
参考文件:官方安装文档