实验环境: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遇到的坑的更多相关文章

  1. linux 安装superset

    背景说明 公司数据分析人员需要将日常监控分析数据进行可视化,在踩了一些坑之后,终于在业务环境中搭建成功superset,后续复现两次流程也是成功的,分享一波... 业务环境说明 操作系统:centos ...

  2. 一、下载安装superset

    1.环境介绍: 操作系统:Windows 10 python版本:3.73 2.创建虚拟环境: 打开命令行窗口,使用安装python自带的pip命令,下载pinenv 虚拟环境工具, pip inst ...

  3. Appium环境的安装以及一路上的坑

    Appium环境的安装以及一路上的坑 第一步环境的安装 l  javaJDK的安装以及环境变量的配置这个我就不说了网上的教程全都是,搜一个安装一下吧 l  AndroidSDK的安装也是如此我是直接安 ...

  4. flutter 安装过程遇到的坑

    Flutter是一个移动应用程序的软件开发工具包(SDK),用一个代码库构建高性能.高保真的iOS和Android应用程序.目标是使开发人员能够为Android和iOS提供自然的高质量的应用,在滚动行 ...

  5. 安装redis时候的坑

    安装redis时候的坑 随手记录一下,以此为借鉴. 1.按照需求下载redis服务 redis可视化文件 2.安装及环境搭建 修改服务里redis.windows-service.conf文件,或者r ...

  6. 在windows下安装Superset

    前言 最近想用一下Superset,这个是一个开源项目,可以直接通过写sql来生成图表,有时候对一些图表需求比较多的时候,可以用的上. Superset是由Airbnb(知名在线房屋短租公司)开源BI ...

  7. Ubuntu16.04安装Superset

    Superset 是Airbnb 开源的大数据可视化平台 其支持的datasource https://superset.incubator.apache.org/index.html?highlig ...

  8. redis安装及遇到的坑-linux

    获取Redis安装包“redis-4.0.8.tar.gz”,上传Linux服务器; 使用root用户解压: tar zxvf redis-4.0.8.tar.gz -C /usr/local/; 进 ...

  9. centos7搭建安装superset

    superset官网: https://superset.incubator.apache.org/ 系统环境:system:centos7 一.安装工具及依赖包安装工具包:yum -y instal ...

随机推荐

  1. Python(Redis 中 Set/Zset 类型数据和其他操作)

    1.redis 基本操作命令 Set 操作 Set 集合就是不允许重复的列表 无序集合 sadd(name,values) 给 name 对应的集合中添加 1 个或多个元素 import redis ...

  2. Android | 带你零代码实现安卓扫码功能

    目录 小序 背景介绍 前期准备 开始搬运 结语 小序   这是一篇纯新手教学,本人之前没有任何安卓开发经验(尴尬),本文也不涉及任何代码就可以使用一个扫码demo,华为scankit真是新手的福音-- ...

  3. 3-MyBatisPlus教程(CRUD-上)

    1,增加MP日志配置 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:m ...

  4. Spring Cloud Alibaba系列(一)nacos作为服务注册中心

    Spring Cloud Alibaba各组件版本关系 Spring Cloud Alibaba Version Sentinel Version Nacos Version RocketMQ Ver ...

  5. 扩欧(exgcd讲解)

    注意本文的证明都来源于这位大大大大大大大牛 知识点.扩展欧几里得求逆元 看完下面的证明后建议联系一下这题同余方程 可以对exgcd的用途和写法有有初步了解. \(问题描述:对于三个自然数 a,b,c ...

  6. Face The Right Way 开关(POJ3276)

    描述: \( N 头牛排成了一列.每头牛或者向前或者向后.为了让所有的牛都面向前方,农夫约翰买了 一台自动转向的机器. 这个机器在购买时就必须设定一个数值 K,机器每操作一次恰好使 K 头连续的牛转向 ...

  7. 微信小程序-swiper(轮播图)抖动问题

    ps:问题 组件swiper(轮播图)真机上不自动滚动 一直卡在那里抖动 以前遇到这个问题,官方一直没有正面回复.就搁置了,不过有大半年没写小程序了也没去关注,今天就去看了下官方文档,发觉更新了点好东 ...

  8. 【HBase】集群搭建/安装部署

    目录 第一步:下载对应的HBase安装包 第二步:上传压缩包并解压 第三步:修改配置文件 第四步:安装包分发到另外两台机器 第五步:三台机器创建软连接 第六步:三台机器添加环境变量 第七步:启动HBa ...

  9. 【源码】RingBuffer(二)——消费者

    消费者如何读取数据? 前一篇是生产者的处理,这一篇讲消费者的处理 我们都知道,消费者无非就是不停地从队列中读取数据,处理数据.但是与BlockedQueue不同的是,RingBuffer的消费者不会对 ...

  10. 多线程高并发编程(9) -- CopyOnWrite写入时复制

    CopyOnWrite写入时复制 CopyOnWrite,即快照模式,写入时复制就是不同线程访问同一资源的时候,会获取相同的指针指向这个资源,只有在写操作,才会去复制一份新的数据,然后新的数据在被写操 ...