安装superset遇到的坑
实验环境:ubuntu16.04
python环境: 3.6.7
安装参考:https://superset.incubator.apache.org/installation.html
特别提醒:
python3.6-dev 一定要安装
1. "Was unable to import superset Error: cannot import name '_maybe_box_datetimelike'"
(venv1) root@VM-220-19-ubuntu:/data# fabmanager create-admin --app superset
Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [admin@fab.org]: admin@aldwx.com
Password:
Repeat for confirmation:
Was unable to import superset Error: cannot import name '_maybe_box_datetimelike'
解决方法
卸载当前pandas版本,安装pandas==0.23.4
(venv1) root@VM-220-19-ubuntu:/data# pip3 uninstall pandas
Uninstalling pandas-0.24.2:
Would remove:
/data/venv1/lib/python3.6/site-packages/pandas-0.24.2.dist-info/*
/data/venv1/lib/python3.6/site-packages/pandas/*
Proceed (y/n)? Y
Successfully uninstalled pandas-0.24.2
(venv1) root@VM-220-19-ubuntu:/data#
(venv1) root@VM-220-19-ubuntu:/data#
(venv1) root@VM-220-19-ubuntu:/data# pip3 install pandas==0.23.4
Collecting pandas==0.23.4
Using cached https://files.pythonhosted.org/packages/e1/d8/feeb346d41f181e83fba45224ab14a8d8af019b48af742e047f3845d8cff/pandas-0.23.4-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: pytz>=2011k in ./venv1/lib/python3.6/site-packages (from pandas==0.23.4) (2018.9)
Requirement already satisfied: numpy>=1.9.0 in ./venv1/lib/python3.6/site-packages (from pandas==0.23.4) (1.16.2)
Requirement already satisfied: python-dateutil>=2.5.0 in ./venv1/lib/python3.6/site-packages (from pandas==0.23.4) (2.8.0)
Requirement already satisfied: six>=1.5 in ./venv1/lib/python3.6/site-packages (from python-dateutil>=2.5.0->pandas==0.23.4) (1.12.0)
Installing collected packages: pandas
2. 创建用户失败
(venv1) root@VM-220-19-ubuntu:/data# fabmanager create-admin --app superset
Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [admin@fab.org]: admin@aldwx.com
Password:
Repeat for confirmation:
Recognized Database Authentications.
2019-03-18 23:14:05,535:ERROR:flask_appbuilder.security.sqla.manager:Error adding new user to database. (sqlite3.IntegrityError) UNIQUE constraint failed: ab_user.email
[SQL: INSERT INTO ab_user (first_name, last_name, username, password, active, email, last_login, login_count, fail_login_count, created_on, changed_on, created_by_fk, changed_by_fk) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
[parameters: ('admin', 'admin', 'admin', 'pbkdf2:sha256:50000$FaQRT7OQ$67953f905b97e56de418b790a5025576a4a0d68fdb140ef0dcde9494e99ced25', 1, 'admin@aldwx.com', None, None, None, '2019-03-18 23:14:05.534844', '2019-03-18 23:14:05.534859', None, None)]
(Background on this error at: http://sqlalche.me/e/gkpj)
No user created an error occured
问题分析
报错提示唯一约束失败。因为创建的用户发生冲突
解决方法1
修改用户,指定其他用户为管理员
解决方法2
如果是新建数据库,可以重建。在此基础上如果是sqlite数据库,可以修改数据库文件名或删除数据库文件,让程序自动重建。
配置数据库的文件 /data/venv1/lib/python3.6/site-packages/superset/config.py
sqlite数据库默认在当前用户下 ~/.superset/superset.db
3. sqlalchemy.exc.InvalidRequestError: Can't determine which FROM clause to join from, there are multiple FROMS which cto help resolve the ambiguity.
(venv1) root@VM-220-19-ubuntu:/data# superset db upgrade
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade bddc498dd179 -> 3dda56f1c4c6, Migrate num_period_compare and perio
INFO [alembic.runtime.migration] Running upgrade 3dda56f1c4c6 -> 1d9e835a84f9, empty message
/data/venv1/lib/python3.6/site-packages/alembic/util/messaging.py:73: UserWarning: Skipping unsupported ALTER for cr
warnings.warn(msg)
INFO [alembic.runtime.migration] Running upgrade bddc498dd179 -> 4451805bbaa1, remove double percents
Traceback (most recent call last):
File "/data/venv1/bin/superset", line 15, in <module>
cli()
File "/data/venv1/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/data/venv1/lib/python3.6/site-packages/flask/cli.py", line 380, in main
return AppGroup.main(self, *args, **kwargs)
File "/data/venv1/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/data/venv1/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/data/venv1/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/data/venv1/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/data/venv1/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/data/venv1/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/data/venv1/lib/python3.6/site-packages/flask/cli.py", line 257, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/data/venv1/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/data/venv1/lib/python3.6/site-packages/flask_migrate/cli.py", line 134, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File "/data/venv1/lib/python3.6/site-packages/flask_migrate/__init__.py", line 95, in wrapped
f(*args, **kwargs)
File "/data/venv1/lib/python3.6/site-packages/flask_migrate/__init__.py", line 280, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/data/venv1/lib/python3.6/site-packages/alembic/command.py", line 276, in upgrade
script.run_env()
File "/data/venv1/lib/python3.6/site-packages/alembic/script/base.py", line 475, in run_env
util.load_python_file(self.dir, "env.py")
File "/data/venv1/lib/python3.6/site-packages/alembic/util/pyfiles.py", line 90, in load_python_file
module = load_module_py(module_id, path)
File "/data/venv1/lib/python3.6/site-packages/alembic/util/compat.py", line 156, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/data/venv1/lib/python3.6/site-packages/superset/migrations/env.py", line 100, in <module>
run_migrations_online()
File "/data/venv1/lib/python3.6/site-packages/superset/migrations/env.py", line 93, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/data/venv1/lib/python3.6/site-packages/alembic/runtime/environment.py", line 839, in run_migrations
self.get_context().run_migrations(**kw)
File "/data/venv1/lib/python3.6/site-packages/alembic/runtime/migration.py", line 361, in run_migrations
step.migration_fn(**kw)
File "/data/venv1/lib/python3.6/site-packages/superset/migrations/versions/4451805bbaa1_remove_double_percents.py"
replace('%%', '%')
File "/data/venv1/lib/python3.6/site-packages/superset/migrations/versions/4451805bbaa1_remove_double_percents.py"
.join(Table)
File "/data/venv1/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2235, in join
from_joinpoint=from_joinpoint,
File "<string>", line 2, in _join
File "/data/venv1/lib/python3.6/site-packages/sqlalchemy/orm/base.py", line 220, in generate
fn(self, *args[1:], **kw)
File "/data/venv1/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2414, in _join
left, right, onclause, prop, create_aliases, outerjoin, full
File "/data/venv1/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2437, in _join_left_to_right
) = self._join_determine_implicit_left_side(left, right, onclause)
File "/data/venv1/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2568, in _join_determine_implicit_lef
"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 cto help resolve the ambiguity.
解决方法
安装sqlalchemy==1.2.18
pip install sqlalchemy==1.2.18 #当时用pip安装的,结果也没问题
安装superset遇到的坑的更多相关文章
- linux 安装superset
背景说明 公司数据分析人员需要将日常监控分析数据进行可视化,在踩了一些坑之后,终于在业务环境中搭建成功superset,后续复现两次流程也是成功的,分享一波... 业务环境说明 操作系统:centos ...
- 一、下载安装superset
1.环境介绍: 操作系统:Windows 10 python版本:3.73 2.创建虚拟环境: 打开命令行窗口,使用安装python自带的pip命令,下载pinenv 虚拟环境工具, pip inst ...
- Appium环境的安装以及一路上的坑
Appium环境的安装以及一路上的坑 第一步环境的安装 l javaJDK的安装以及环境变量的配置这个我就不说了网上的教程全都是,搜一个安装一下吧 l AndroidSDK的安装也是如此我是直接安 ...
- flutter 安装过程遇到的坑
Flutter是一个移动应用程序的软件开发工具包(SDK),用一个代码库构建高性能.高保真的iOS和Android应用程序.目标是使开发人员能够为Android和iOS提供自然的高质量的应用,在滚动行 ...
- 安装redis时候的坑
安装redis时候的坑 随手记录一下,以此为借鉴. 1.按照需求下载redis服务 redis可视化文件 2.安装及环境搭建 修改服务里redis.windows-service.conf文件,或者r ...
- 在windows下安装Superset
前言 最近想用一下Superset,这个是一个开源项目,可以直接通过写sql来生成图表,有时候对一些图表需求比较多的时候,可以用的上. Superset是由Airbnb(知名在线房屋短租公司)开源BI ...
- Ubuntu16.04安装Superset
Superset 是Airbnb 开源的大数据可视化平台 其支持的datasource https://superset.incubator.apache.org/index.html?highlig ...
- redis安装及遇到的坑-linux
获取Redis安装包“redis-4.0.8.tar.gz”,上传Linux服务器; 使用root用户解压: tar zxvf redis-4.0.8.tar.gz -C /usr/local/; 进 ...
- centos7搭建安装superset
superset官网: https://superset.incubator.apache.org/ 系统环境:system:centos7 一.安装工具及依赖包安装工具包:yum -y instal ...
随机推荐
- 数学--数论--HDU-2698 Maximum Multiple(规律)
Given an integer nn, Chiaki would like to find three positive integers xx, yy and zzsuch that: n=x+y ...
- 图论--最长路--洛谷P1807 最长路_NOI导刊2010提高(07)
题目描述 设G为有n个顶点的有向无环图,G中各顶点的编号为1到n,且当为G中的一条边时有i < j.设w(i,j)为边的长度,请设计算法,计算图G中<1,n>间的最长路径. 输入格式 ...
- P6474 [NOI Online #2 入门组] 荆轲刺秦王
P6474 [NOI Online #2 入门组] 荆轲刺秦王 bfs+差分+卡常 本来我其实是场内选手,但是因为记错提交时间,晚了半小时才交,交不上了,就自动降级为了场外选手 题面复杂,不简述了 首 ...
- golang之channel
Buffered Channels package main import "fmt" func main() { ch := make(chan int, 2) ch <- ...
- TSP变形(三进制状压)
题目:HDU3001 #include <bits/stdc++.h> using namespace std; ],vis[][],dis[][]; ][]; void init()// ...
- Mysql常用sql语句(九)- like 模糊查询
测试必备的Mysql常用sql语句,每天敲一篇,每次敲三遍,每月一循环,全都可记住!! https://www.cnblogs.com/poloyy/category/1683347.html 前言 ...
- Openwrt:编译固件提示[mktplinkfw] error: images are too big 错误
在编译mr3420的固件时,添加了luci.jamvm,但是最终编译的固件"openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-factory.bin& ...
- .NET Attribute在数据校验上的应用
Attribute(特性)的概念不在此赘述了,相信有点.NET基础的开发人员都明白,用过Attribute的人也不在少数,毕竟很多框架都提供自定义的属性,类似于Newtonsoft.JSON中Json ...
- Autojs - 用 JavaScript 实现自己的安卓手机自动化工具脚本
我是风筝,公众号「古时的风筝」,一个不只有技术的技术公众号,一个在程序圈混迹多年,主业 Java,另外 Python.React 也玩儿的 6 的斜杠开发者. Spring Cloud 系列文章已经完 ...
- Codeforces Round #635C Linova and Kingdom 思维
Linova and Kingdom 题意 现在有一颗n个节点的树,每个节点是一个城市,现在要选出k个城市作为工业城市,其他城市作为旅游城市,现在每个工业城市要派出一名特使前往根节点,每个特使的幸福度 ...