当前位置: 首页 > news >正文

部署Superset BI(六)Superset 的主机安装

前面试水了使用docker安装Superset,但是连接数据库的时候,虽然sqlserver安装了驱动,但是数据库类型并没有出现在选择列表中,oracle更是连驱动安装都成问题,看网上别人主机安装轻飘飘就完成了,就继续试试本地化安装是否没有这个问题。
一.安装ubuntu20.4
二.环境准备
--安装必要的组件
admin@supersetbi:~$ sudo apt-get install build-essential libssl-dev libffi-dev python3-dev python3-pip libsasl2-dev libldap2-dev default-libmysqlclient-dev

--创建虚拟环境
admin@supersetbi:~$ pip install virtualenv
admin@supersetbi:~$ python3 -m venv venv
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
    apt install python3.8-venv
You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.
Failing command: ['/home/admin/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']

admin@supersetbi:~$ apt install python3.8-venv
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
admin@supersetbi:~$ sudo apt install python3.8-venv
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  python3.8-venv
0 upgraded, 1 newly installed, 0 to remove and 57 not upgraded.
Need to get 5,448 B of archives.
After this operation, 27.6 kB of additional disk space will be used.
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 python3.8-venv amd64 3.8.10-0ubuntu1~20.04.18 [5,448 B]
Fetched 5,448 B in 0s (29.9 kB/s)
Selecting previously unselected package python3.8-venv.
(Reading database ... 77983 files and directories currently installed.)
Preparing to unpack .../python3.8-venv_3.8.10-0ubuntu1~20.04.18_amd64.deb ...
Unpacking python3.8-venv (3.8.10-0ubuntu1~20.04.18) ...
Setting up python3.8-venv (3.8.10-0ubuntu1~20.04.18) ...
admin@supersetbi:~$ python3 -m venv venv

--激活虚拟环境
admin@supersetbi:~$ . venv/bin/activate

三.第一次尝试安装superset,失败
(venv) admin@supersetbi:~$ pip install apache_superset
遇到错误
Building wheels for collected packages: apache-superset, func-timeout, pgsanity, admin, wtforms-json, pymeeus
  Building wheel for apache-superset (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/admin/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dtml50dj/apache-superset/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dtml50dj/apache-superset/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-7ilnt9rb
       cwd: /tmp/pip-install-dtml50dj/apache-superset/
  Complete output (11 lines):
  fatal: not a git repository (or any of the parent directories): .git
  -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
  VERSION: 2.1.3
  GIT SHA:
  -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
 (venv) admin@supersetbi:~$ git status
fatal: not a git repository (or any of the parent directories): .git
(venv) admin@supersetbi:~$ git init
Initialized empty Git repository in /home/admin/.git/
继续安装,pass
(venv) admin@supersetbi:~$ pip install apache_superset
--设置密码
(venv) admin@supersetbi:~$ export SUPERSET_SECRET_KEY=Wodesuperset2025
(venv) admin@supersetbi:~$ export FLASK_APP=superset
--数据库初始化
(venv) admin@supersetbi:~$ superset db upgrade
提示错误:
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (typing-extensions 4.13.2 (/home/admin/venv/lib/python3.8/site-packages), Requirement.parse('typing-extensions==4.12.2; python_version < "3.10"'), {'kombu'})
pyth
(venv) admin@supersetbi:~$ python --version
Python 3.8.10
admin@supersetbi:~$ . venv/bin/activate
查看网站上版本已经到了4.12,可是pip版本还只有2.1.3
(venv) admin@supersetbi:~$ pip install apache_superset==4.1.2
ERROR: Could not find a version that satisfies the requirement apache_superset==4.1.2 (from versions: 0.34.0, 0.34.1, 0.35.1, 0.35.2, 0.36.0, 0.37.0, 0.37.1, 0.37.2, 0.38.0, 0.38.1, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.4.1, 1.4.2, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 2.0.0, 2.0.1, 2.1.0, 2.1.1rc1, 2.1.1rc2, 2.1.1rc3, 2.1.1, 2.1.2, 2.1.3)
ERROR: No matching distribution found for apache_superset==4.1.2

四.第二次尝试手工安装superset,失败
--下载安装包
(venv) admin@supersetbi:~$ wget https://files.pythonhosted.org/packages/f6/86/a5c2056bcfe7a05eba090212b6f71632ba45832c243a2711403ce4f53acc/apache-superset-4.1.2.tar.gz
apache-superset-4.1.2  apache-superset-4.1.2.tar.gz  Python-3.10.14  Python-3.10.14.tgz  venv
--安装
(venv) admin@supersetbi:~$ python3 -m pip install apache-superset-4.1.2.tar.gz
Processing ./apache-superset-4.1.2.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
ERROR: Package 'apache-superset-4.1.2' requires a different Python: 3.8.10 not in '~=3.9'
(venv) admin@supersetbi:~$
既然python不符合要求,那就升级python
--升级安装Python3.10。
(venv) admin@supersetbi:~$sudo apt update
(venv) admin@supersetbi:~$sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
VERSION=3.10.14
(venv) admin@supersetbi:~$wget https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz
(venv) admin@supersetbi:~$tar -xf Python-$VERSION.tgz</

http://www.xdnf.cn/news/407323.html

相关文章:

  • 文件上传总结
  • Redis——达人探店
  • CSS3 遮罩
  • HTML5 中实现盒子水平垂直居中的方法
  • 【启动盘制作】macbook 制作windows启动盘,重装 Windows 的详细教程
  • C++:公有,保护及私有继承
  • 数据结构-树(1)
  • 硬件设备基础
  • 豆瓣电影Top250数据工程实践:从爬虫到智能存储的技术演进(含完整代码)
  • Mysql使用PXC实现高可用
  • js 字符串中的特殊字符全部替换成定义对象里面key对应的value值(进阶篇)
  • Python60日基础学习打卡D12【虫豸版】
  • 如何使用 React Hooks 替代类组件的生命周期方法?
  • Linux服务器连接SSH工具FinalShell安装使用支持Linux文件上传下载
  • (自用)Java学习-5.8(总结,springboot)
  • 【合新通信】无人机天线拉远RFOF(射频光纤传输)解决方案
  • upload-labs通关笔记-第01关 文件上传之前端绕过(3种渗透方法)
  • 浙江大学 deepseek 公开课 第三季 第3期 - 陈喜群 教授 (附PPT下载) by 突破信息差
  • Linux笔记---信号(上)
  • SWMM在城市排水防涝规划中的实战应用:模型校准、情景模拟与工程决策
  • Linux进程10-有名管道概述、创建、读写操作、两个管道进程间通信、读写规律(只读、只写、读写区别)、设置阻塞/非阻塞
  • WordPress 网站上的 jpg、png 和 WebP 图片插件
  • 请解释 React Native 的新架构(Fabric 和 TurboModules)与旧架构的主要区别
  • 「光域」系列激光测距传感器:以光为尺,重构空间认知边界
  • 【华为HCIP | 华为数通工程师】821—多选解析—第二十二页
  • 详解 IRC协议 及客户端工具 WeeChat 的使用
  • OpenCV进阶操作:光流估计
  • Linux基础命令之目录管理——了解各种操作文件目录的命令,万字教学,超详细!!!(1)
  • OCCT知识笔记之分解BOX
  • 计算频谱的方法