安装使用 superset
安装 superset
创建虚拟环境:
python -m venv msuperset
激活虚拟环境:
cd msuperset
source bin/activate
安装 superset
pip install superset
如果遇到报错:
Running setup.py install for python-geohash ... error
Complete output from command /root/code/python/msuperset/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-szdbf0qe/python-geohash/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-omybv2pz-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/code/python/msuperset/include/site/python3.6/python-geohash:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying geohash.py -> build/lib.linux-x86_64-3.6
copying quadtree.py -> build/lib.linux-x86_64-3.6
copying jpgrid.py -> build/lib.linux-x86_64-3.6
copying jpiarea.py -> build/lib.linux-x86_64-3.6
running build_ext
building '_geohash' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
gcc -pthread -B /root/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYTHON_MODULE=1 -I/root/code/python/msuperset/include -I/root/miniconda3/include/python3.6m -c src/geohash.cpp -o build/temp.linux-x86_64-3.6/src/geohash.o
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/root/code/python/msuperset/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-szdbf0qe/python-geohash/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-omybv2pz-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/code/python/msuperset/include/site/python3.6/python-geohash" failed with error code 1 in /tmp/pip-build-szdbf0qe/python-geohash/
需要安装 gcc-c++:
yum install gcc-c++
装完 gcc-c++ 后,再执行 pip install superset 应该就没问题了。
配置 superset
创建管理员用户
fabmanager create-admin --app superset
执行的时候会有这么一行提示:
fabmanager is going to be deprecated in 2.2.X, you can use the same commands on the improved 'flask fab <command>'
这是一个新的用法了,还没有研究
接着会让你输入用户名(username)、Fist Name、Last Name、邮箱地址、密码、重复密码。
如果遇到以下错误:
Was unable to import superset Error: cannot import name '_maybe_box_datetimelike'
原因是 pandas (在安装 superset 时会做为依赖被安装上)版本太高,需要卸载,再安装低版本的 pandas。
pip install pandas==0.23.4
参考https://blog.csdn.net/kongxx/article/details/89006787
然后重新执行创建管理员用户的命令:
fabmanager create-admin --app superset
初始化数据库
superset db upgrade
如果遇到错误:
...
File "/root/code/python/msuperset/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2572, in _join_determine_implicit_left_side
"Can't determine which FROM clause to join "
sqlalchemy.exc.InvalidRequestError: Can't determine which FROM clause to join from, there are multiple FROMS which can join to this entity. Try adding an explicit ON clause to help resolve the ambiguity.
说明 sqlalchemy 版本太高了,要降级 sqlalchemy:
pip install sqlalchemy==1.2.18
参考https://github.com/apache/incubator-superset/issues/6977
载入测试数据
superset load_examples
初始化角色和权限
superset init
启动服务
端口号 8088,使用 -p 更改端口号
superset runserver
然后在浏览器中打开 http://localhsot:8088 就可以看到 superset 了
添加 mysql 数据源时出错
提示
ModuleNotFoundError: No module named 'MySQLdb'
因为 MySQLdb 是 python2 的产品。可使用 mysqlclient 方式代替。要安装 mysqlclient:
先安装需要用到的系统依赖:
Ubuntu 下:
sudo apt-get install python3-dev libmysqlclient-dev
CentOS 下:
yum install python-devel mysql-devel
然后安装 mysqlclient:
pip install mysqlclient
其它错误
...
In file included from sasl/saslwrapper.cpp:254:0:
sasl/saslwrapper.h:22:10: fatal error: sasl/sasl.h: No such file or directory
#include <sasl/sasl.h>
^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
安装 libsasl2-dev
ubuntu
apt-get install libsasl2-dev
centos
yum -y install cyrus-sasl cyrus-sasl-devel cyrus-sasl-lib
其它操作参考:
轻量级BI工具Superset的搭建与使用
官方安装说明
安装使用 superset的更多相关文章
- 一、下载安装superset
1.环境介绍: 操作系统:Windows 10 python版本:3.73 2.创建虚拟环境: 打开命令行窗口,使用安装python自带的pip命令,下载pinenv 虚拟环境工具, pip inst ...
- superset 安装配置
一.配置python虚拟环境,请参考 superset依赖python3.6环境 https://www.cnblogs.com/xibuhaohao/p/9994854.html 二.安装配置sup ...
- 开源数据可视化BI工具SuperSet(安装)
本次安装教程共分两大步骤,因为Superset 基于python3编写的web应用(flask) 所以要求python3环境,故首先要将linux系统自带的环境进行升级,已经是python3的可跳过- ...
- 二、初始化superset
上一步成功安装了superset, 1.初始化数据 创建命令 #创建管理员账号fabmanager create-admin --app superset#cd到superset 根目录参考路径 C: ...
- superset链接本地mysql数据库
刚安装好superset的时候大家都知道是用的其自动生成的sqllite数据库,如果我们想让器链接到自己数据库,给大家分享一下我的方法,以mysql为例: 1.安装好数据库mysql: $ sudo ...
- superset 错误解决
访问superset localhost:8088 securety->list Role 报错 xxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxx ...
- 如何将Superset嵌入后台系统之实践
1. 前言 此次实践过程全属个人学习,我选择了在window下安装Superset,并进行嵌入后台系统实践.对此进行实践过程总结,实践成果分享给大家,供大家参考,如果你有更好的想法,欢迎留言交流. 2 ...
- Apache Superset 1.2.0教程 (二)——快速入门(可视化王者英雄数据)
上一篇我们已经成功的安装了superset,那么该如何可视化我们的数据呢?本文将可视化王者英雄的数据,快速的入门Superset. 一.连接数据源 首先确保mysql可以正常连接使用,并且准备好数据. ...
- Apache Superset 1.2.0教程 (三)—— 图表功能详解
通过之前章节的学习,我们已经成功地安装了superset,并且连接mysql数据库,可视化了王者英雄的数据.使用的是最简单Table类型的图表,但是superset还支持非常多的图表类型. 本文我们将 ...
随机推荐
- PHP+Mysql查询上一篇和下一篇文章实例
简单的PHP+Mysql查询上一篇和下一篇文章实例,并输出上一篇和下一篇文章的标题和链接,适合新手学习 获取当前浏览文章id: $id = isset($_GET['id']) > 0 ? in ...
- JS 中 判断数据类型 typeof详解
typeof 可用来获取检测变量的数据类型 语法 typeof operand typeof(operand) 参数 operand 一个表示对象或原始值的表达式,其类型将被返回. 描述 下表总结 ...
- JS中的NaN和isNaN,简直是双重人格?
number数字类型 包括数字和NaN,NaN:not a number 但是它是数字类型的 isNaN的用法:检测当前值是否不是有效数字,返回true代表不是有效数字,返回false是有效数字 ...
- flink on yarn模式下两种提交job方式
yarn集群搭建,参见hadoop 完全分布式集群搭建 通过yarn进行资源管理,flink的任务直接提交到hadoop集群 1.hadoop集群启动,yarn需要运行起来.确保配置HADOOP_HO ...
- Sublime Text 3 插件安装、搭建Python、Java开发环境
一.下载并安装 Sublime Text 3 官网地址:http://www.sublimetext.com目前最新版本为:3.2.1 (BUILD 3207)安装时勾选“Add to explore ...
- tcp粘包、解决粘包问题
目录 subproess模块 TCP粘包问题 粘包两种情况 解决粘包问题 struct模块的使用 使用struct模块解决粘包 优化解决粘包问题 上传大文件 服务端 客户端 UDP协议 upd套接字 ...
- 01 python的安装
下载3.7.0版本 然后点击 close 关闭 1-==>搜索输入“cmd”输入 “python -V”并回车. 出现版本说明安装成功.2==>>>> 是提示符3=== ...
- localStorage在不同页面之间的设置值与取值--加密 localStorage与解密localStorage
在aa.vue页面 <template> <div> <h1>在aa页面设置值</h1> <button @click="shezhi& ...
- Vue生命周期钩子---3
vue生命周期流程图:4张图 : 生命周期的解析和应用: Vue 实例有一个完整的生命周期,也就是从开始创建.初始化数据.编译模板.挂载Dom→渲染.更新→渲染.卸载等一系列过程,我们称这是 Vue ...
- luoguP5094 [USACO04OPEN]MooFest 狂欢节
get 到的 这种需要求 含 max 的式子,枚举最大值的方法非常普遍. 类似的,还有含 min , gcd 的式子,枚举他们也很普遍 主要难点 我们首先想到,先按 v 从小到大排序,因为这样既可以简 ...