For reference documents, see the official website; the address is as follows
https://superset.incubator.apache.org/installation.html
sudo yum upgrade python-setuptools -y
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel -ycurl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
检查 python 版本
[root@pxc ~]# python -V
Python 2.7.5
Upgrade python version to python 3.5.4
# Install superset
pip install superset
# Create an admin user (you will be prompted to set username, first and last name before setting a password)
fabmanager create-admin --app superset
[root@node1 Python-3.5.4]# fabmanager create-admin --app superset
Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [[email protected]]: admin
Password:
Repeat for confirmation:
Was unable to import superset Error: No module named 'pysqlite2'
Downgrading the python version still does not solve this problem
[root@node1 Python-3.5.4]# mv /usr/bin/python.bak /usr /bin/python
mv: overwrite `/usr/bin/python'? yes
[root@node1 Python-3.5.4]#
[root@node1 Python-3.5.4]#
[root@node1 Python-3.5.4]# python -V
Python 2.6.6
[root@node1 Python-3.5.4]#
[root@node1 Python-3.5.4]# vim /usr/bin/yum
[root@node1 Python-3.5.4]#
[root@node1 Python-3.5.4]#
[root@node1 Python-3.5.4]# python ez_setup.py
Setuptools version 0.6c11 or greater has been installed.
(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)
Then follow the steps on the official website
[root@pxc ~]# pip install virtualenv
[root@pxc ~]# virtualenv venv
New python executable in /root/venv/bin/python
Installing setuptools, pip, wheel...done.
[root@pxc ~]# . ./venv/bin/activate
(venv) [root@pxc ~]#
(venv) [root@pxc ~]#
(venv) [root@pxc ~]#
(venv) [root@pxc ~]#
(venv) [root@pxc ~]#
(venv) [root@pxc ~]#
(venv) [root@pxc ~]# pip install superset
# Initialize the database
superset db upgrade
# Load some data to play with
superset load_examples
# Create default roles and permissions
superset init
# Start the web server on port 8088, use -p to bind to another port
superset runserver
# To start a development web server, use the -d switch
# superset runserver -d
http://192.168.137.151:8088/login/