Mac操作系统搭建轻量级BI工具Superset
前言
Superset是一款可视化的BI工具,主要依赖于python环境。
pip 是一个Python包安装与管理工具。
1、首先查看是否存在pip
$ pip --version
-bash: pip: command not found
出现提示信息,说明我们机器并没有安装pip命令。
2、安装pip命令
备注:Mac操作系统自带了python,默认的是2.7,我们不使用自带,安装新版本的
Python3 的安装方式
$ curl https://bootstrap.pypa.io/get-pip.py | python3
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1825k 100 1825k 0 0 16620 0 0:01:52 0:01:52 --:--:-- 12362
Collecting pip
Downloading pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 14 kB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Uninstalling pip-20.0.2:
Successfully uninstalled pip-20.0.2
Successfully installed pip-20.1.1
出现 successfully,则说明卸载旧版本pip,安装新版本已经成功。
3、安装setuptools工具
$ pip install --upgrade setuptools pip
Collecting setuptools
Downloading setuptools-49.2.0-py3-none-any.whl (789 kB)
|████████████████████████████████| 789 kB 10 kB/s
Requirement already up-to-date: pip in /usr/local/lib/python3.7/site-packages (20.1.1)
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 46.0.0
Uninstalling setuptools-46.0.0:
Successfully uninstalled setuptools-46.0.0
Successfully installed setuptools-49.2.0
出现 successfully,则说明卸载旧版本setuptools安装新版本已经成功。
4、添加支持以及初始化
备注:安装superset,这一步骤执行过程很慢,很不建议使用命令行模式来执行
$ pip install apache-superset
Collecting apache-superset
Using cached apache-superset-0.36.0.tar.gz (47.1 MB)
Collecting backoff=1.8.0
Using cached backoff-1.10.0-py2.py3-none-any.whl (31 kB)
Collecting bleach<4.0.0,=3.0.2
Using cached bleach-3.1.5-py2.py3-none-any.whl (151 kB)
Collecting celery!=4.4.1,<5.0.0,=4.3.0
Using cached celery-4.4.6-py2.py3-none-any.whl (426 kB)
Collecting click<8
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting colorama
Using cached colorama-0.4.3-py2.py3-none-any.whl (15 kB)
Collecting contextlib2
Using cached contextlib2-0.6.0.post1-py2.py3-none-any.whl (9.8 kB)
Collecting croniter=0.3.28
Using cached croniter-0.3.34-py2.py3-none-any.whl (19 kB)
Collecting cryptography=2.4.2
Using cached cryptography-3.0-cp35-abi3-macosx_10_10_x86_64.whl (1.8 MB)
Collecting flask<2.0.0,=1.1.0
Using cached Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting flask-appbuilder<2.4.0,=2.3.1
Using cached Flask_AppBuilder-2.3.4-py3-none-any.whl (1.7 MB)
Collecting flask-caching
Using cached Flask_Caching-1.9.0-py2.py3-none-any.whl (33 kB)
Collecting flask-compress
Using cached Flask-Compress-1.5.0.tar.gz (6.5 kB)
Collecting flask-talisman
Using cached flask_talisman-0.7.0-py2.py3-none-any.whl (12 kB)
Collecting flask-migrate
Using cached Flask_Migrate-2.5.3-py2.py3-none-any.whl (13 kB)
Collecting flask-wtf
Using cached Flask_WTF-0.14.3-py2.py3-none-any.whl (13 kB)
Collecting geopy
Using cached geopy-2.0.0-py3-none-any.whl (111 kB)
Collecting gunicorn<20.1,=20.0.2
Using cached gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
Collecting humanize
Using cached humanize-2.5.0-py3-none-any.whl (65 kB)
Collecting isodate
Using cached isodate-0.6.0-py2.py3-none-any.whl (45 kB)
Collecting markdown=3.0
Using cached Markdown-3.2.2-py3-none-any.whl (88 kB)
Collecting msgpack<0.7.0,=0.6.1
Using cached msgpack-0.6.2-cp37-cp37m-macosx_10_14_x86_64.whl (79 kB)
Collecting pandas<1.0,=0.25.3
Using cached pandas-0.25.3-cp37-cp37m-macosx_10_9_x