安装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 ...
随机推荐
- 【K8S】K8S部署Metrics-Server服务
写在前面 在新版的K8S中,系统资源的采集均使用Metrics-Server服务,可以通过Metrics-Server服务采集节点和Pod的内存.磁盘.CPU和网络的使用率等信息. 读者可参考< ...
- 图论--网络流--最大流 洛谷P4722(hlpp)
题目描述 给定 nn 个点,mm 条有向边,给定每条边的容量,求从点 ss 到点 tt 的最大流. 输入格式 第一行包含四个正整数nn.mm.ss.tt,用空格分隔,分别表示点的个数.有向边的个数.源 ...
- python(类继承)
一.继承 1.单继承 一个对象使用另一个对象的属性和方法,被继承的类也称父类 (1)父类与子类的方法不一样 class Four(): def sub(self,x,y): return x + y ...
- gulp基本使用
一.gulp是什么 gulp强调的是前端开发的工作流程,我们可以通过定义task事件定义事件的执行顺序,gulp去执行这些事件,构建整个前端开发的工作流程 gulp常见定义事件,例如: 变更静态资源 ...
- Unity ugui拖动控件(地图模式与物件模式)
拖动在游戏中使用频繁,例如将装备拖动到指定的快捷栏,或者大地图中拖动以查看局部信息等. Unity的EventSystems中可以直接继承几个接口来实现拖动功能,如下: namespace Unity ...
- 【matlab系列汇总】小白博主的matlab学习实战快速进阶之路(持续更新)
我把之前在学习和工作中使用matlab的技巧和使用教程等相关整理到这里,方便查阅学习,如果能帮助到您,请帮忙点个赞: MATLAB可以进行矩阵运算.绘制函数和数据.实现算法.创建用户界面.连接其他编程 ...
- Excel非常规快捷键
Windows+V,调出剪贴板,是常规快捷键,鼠标右键-W-F,新建文件夹,这是非常规快捷键. 掌握Excel大半菜单和三五十快捷键,Excel也算入门了.对Excel快捷键的学习,其一是常规快捷键, ...
- 1005 Spell It Right (20分)
1005 Spell It Right (20分) 题目: Given a non-negative integer N, your task is to compute the sum of all ...
- box-sizing 可以使border padding不影响设置的盒子尺寸
- 从`ArrayList`中了解Java的迭代器
目录 什么是迭代器 迭代器的设计意义 ArrayList对迭代器的实现 增强for循环和迭代器 参考链接 什么是迭代器 Java中的迭代器--Iterator是一个位于java.util包下的接口,这 ...