首页 > 其他分享 >datacheck安装

datacheck安装

时间:2024-08-23 17:17:38浏览次数:10  
标签:__ datacheck local usr packages 安装 python3.9

datacheck安装

1. 运行环境

DataCheck 运行环境要求:

  • Python 版本:3.7 及以上版本。
  • 数据库:目前支持 PostgreSQL、Sybase ASE、Oracle 。
  • 操作系统:要求Debian 10+、Ubuntu 16.04+、SLES 12 SP5 和 15 SP3 或 CentOS / RHEL 7+ /KyLin 10。

2. 安装/升级

⚠️注意:使用前检查当前版本再根据下面提供的两种情况执行安装:

DataCheck 1.7.0 及以上版本:

  1. 解压

    tar	-zxvf datacheck-1.7.0-python3.9.16-rhel7-x86_64.tar.gz -C /opt/soft
    
  2. 安装

    这里会存在两个情况,如果在未安装python虚拟环境的情况下运行会出现如下提示:

    WARRING: python virtualenv is not exists. 
    INFO: please enter new virtual env path[/usr/local/datacheck]:
    

    默认在当前路径下创建虚拟环境,输入路径可以指定创建虚拟环境的目录。并在环境变量中写入当前虚拟环境的配置。

    Creating virtual environment in /usr/local/datacheck
    Writing virtualenv environment variables to /home/postgres/.bashrc
    # add by datacheck
    source /usr/local/datacheck/venv-datacheck-1.7.0/bin/activate
    Looking in links: /usr/local/datacheck/package
    Processing ./package/configobj-5.0.8-py2.py3-none-any.whl
    Processing ./package/psycopg2_binary-2.9.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
    Processing ./package/PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
    Processing ./package/six-1.16.0-py2.py3-none-any.whl
    Processing ./package/tabulate-0.9.0-py3-none-any.whl
    Processing ./package/tqdm-4.66.1-py3-none-any.whl
    Installing collected packages: tqdm, tabulate, six, PyYAML, psycopg2-binary, configobj
    Successfully installed PyYAML-6.0.1 configobj-5.0.8 psycopg2-binary-2.9.7 six-1.16.0 tabulate-0.9.0 tqdm-4.66.1
    Processing ./package/datacheck-1.7.0-py3-none-any.whl
    Requirement already satisfied: PyYAML>=6.0.1 in ./venv-datacheck-1.7.0/lib/python3.9/site-packages (from datacheck==1.7.0) (6.0.1)
    Requirement already satisfied: psycopg2-binary<=2.9.7,>=2.9.3 in ./venv-datacheck-1.7.0/lib/python3.9/site-packages (from datacheck==1.7.0) (2.9.7)
    Requirement already satisfied: six>=1.16.0 in ./venv-datacheck-1.7.0/lib/python3.9/site-packages (from datacheck==1.7.0) (1.16.0)
    Requirement already satisfied: tabulate>=0.9.0 in ./venv-datacheck-1.7.0/lib/python3.9/site-packages (from datacheck==1.7.0) (0.9.0)
    Requirement already satisfied: tqdm>=4.66.1 in ./venv-datacheck-1.7.0/lib/python3.9/site-packages (from datacheck==1.7.0) (4.66.1)
    Requirement already satisfied: configobj>=5.0.8 in ./venv-datacheck-1.7.0/lib/python3.9/site-packages (from datacheck==1.7.0) (5.0.8)
    Installing collected packages: datacheck
    Successfully installed datacheck-1.7.0
    

    如果存在python虚拟环境,则会直接安装在虚拟环境中:

    sh install.sh 
    Looking in links: /usr/local/datacheck/package
    Requirement already satisfied: configobj==5.0.8 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from -r /usr/local/datacheck/package/requirements.txt (line 1)) (5.0.8)
    Requirement already satisfied: psycopg2-binary==2.9.7 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from -r /usr/local/datacheck/package/requirements.txt (line 2)) (2.9.7)
    Requirement already satisfied: PyYAML==6.0.1 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from -r /usr/local/datacheck/package/requirements.txt (line 3)) (6.0.1)
    Requirement already satisfied: six==1.16.0 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from -r /usr/local/datacheck/package/requirements.txt (line 4)) (1.16.0)
    Requirement already satisfied: tabulate==0.9.0 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from -r /usr/local/datacheck/package/requirements.txt (line 5)) (0.9.0)
    Requirement already satisfied: tqdm==4.66.1 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from -r /usr/local/datacheck/package/requirements.txt (line 6)) (4.66.1)
    Processing ./package/datacheck-1.7.0-py3-none-any.whl
    Requirement already satisfied: psycopg2-binary<=2.9.7,>=2.9.3 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from datacheck==1.7.0) (2.9.7)
    Requirement already satisfied: tqdm>=4.66.1 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from datacheck==1.7.0) (4.66.1)
    Requirement already satisfied: tabulate>=0.9.0 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from datacheck==1.7.0) (0.9.0)
    Requirement already satisfied: six>=1.16.0 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from datacheck==1.7.0) (1.16.0)
    Requirement already satisfied: configobj>=5.0.8 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from datacheck==1.7.0) (5.0.8)
    Requirement already satisfied: PyYAML>=6.0.1 in /usr/local/patroni/venv-patroni-3.1.0/lib/python3.9/site-packages (from datacheck==1.7.0) (6.0.1)
    Installing collected packages: datacheck
    Successfully installed datacheck-1.7.0
    
  3. 查看版本信息

    (test_env) [postgres@mmrpatroni6 datacheck]$ datacheck -v
    
     ___       _         ___ _           _   
    |   \ __ _| |_ __ _ / __| |_  ___ __| |__
    | |) / _` |  _/ _` | (__| ' \/ -_) _| / /
    |___/\__,_|\__\__,_|\___|_||_\___\__|_\_
    
    --- DataCheck - FBaseDB data compare tools .
    --- Version: 1.7.0
    

DataCheck 1.2.0 - 1.6.2 版本

  1. 解压

    tar	-zxvf datacheck-1.2.0-python3.9.16-rhel7-x86_64.tar.gz -C /opt/soft
    
  2. 安装

    这里会存在两个情况,如果在未安装python虚拟环境的情况下运行会出现如下提示:

    do you want to installed in local python env [yes/no]: 
    

    输入 yes 会安装在本地环境中,输入 no 则会退出并输出如下提示:

    INFO: please activate the virtual environment and try again.
    

    如果存在python虚拟环境,则会直接安装在虚拟环境中:

    (test_env) [postgres@mmrpatroni6 datacheck]$ sh install.sh 
    Looking in links: /usr/local/datacheck/package
    Processing ./package/configobj-5.0.8-py2.py3-none-any.whl
    Processing ./package/psycopg2_binary-2.9.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
    Processing ./package/PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
    Processing ./package/six-1.16.0-py2.py3-none-any.whl
    Processing ./package/tabulate-0.9.0-py3-none-any.whl
    Processing ./package/tqdm-4.66.1-py3-none-any.whl
    Installing collected packages: tqdm, tabulate, six, PyYAML, psycopg2-binary, configobj
    Successfully installed PyYAML-6.0.1 configobj-5.0.8 psycopg2-binary-2.9.7 six-1.16.0 tabulate-0.9.0 tqdm-4.66.1
    Processing ./package/datacheck-1.2.0-py3-none-any.whl
    Requirement already satisfied: psycopg2-binary<=2.9.7,>=2.9.3 in /home/postgres/test_env/lib/python3.9/site-packages (from datacheck==1.2.0) (2.9.7)
    Requirement already satisfied: tqdm>=4.66.1 in /home/postgres/test_env/lib/python3.9/site-packages (from datacheck==1.2.0) (4.66.1)
    Requirement already satisfied: tabulate>=0.9.0 in /home/postgres/test_env/lib/python3.9/site-packages (from datacheck==1.2.0) (0.9.0)
    Requirement already satisfied: PyYAML>=6.0.1 in /home/postgres/test_env/lib/python3.9/site-packages (from datacheck==1.2.0) (6.0.1)
    Requirement already satisfied: configobj>=5.0.8 in /home/postgres/test_env/lib/python3.9/site-packages (from datacheck==1.2.0) (5.0.8)
    Requirement already satisfied: six>=1.16.0 in /home/postgres/test_env/lib/python3.9/site-packages (from datacheck==1.2.0) (1.16.0)
    Installing collected packages: datacheck
    Successfully installed datacheck-1.2.0
    
  3. 查看版本信息

    (test_env) [postgres@mmrpatroni6 datacheck]$ datacheck -v
    
     ___       _         ___ _           _   
    |   \ __ _| |_ __ _ / __| |_  ___ __| |__
    | |) / _` |  _/ _` | (__| ' \/ -_) _| / /
    |___/\__,_|\__\__,_|\___|_||_\___\__|_\_
    
    --- DataCheck - FBaseDB data compare tools .
    --- Version: 1.3.0
    
  4. 升级

    解压新版本,执行 update.sh 脚本即可。

3. 演示步骤

3.1 下载安装包

[root@pg soft]# ll
-rw-r--r--. 1 root root  14959499 8月  19 17:54 datacheck-2.5.0-python3.9.16-rhel7-x86_64.tar.gz

3.2 解压安装包

tar -zxvf datacheck-2.5.0-python3.9.16-rhel7-x86_64.tar.gz -C /usr/local/soft/

3.3 在数据库用户下进行安装

chown fbase:fbase -R /usr/local/soft/datacheck/
su - fbase
cd /usr/local/soft/datacheck/
sh install.sh

3.4 验证

[fbase@pg datacheck]$ source ~/.bashrc 
(venv-datacheck-2.5.0) [fbase@pg datacheck]$ datacheck -v
Traceback (most recent call last):
  File "/usr/local/soft/datacheck/venv-datacheck-2.5.0/bin/datacheck", line 5, in <module>
    from source.data_check import main
  File "/usr/local/soft/datacheck/venv-datacheck-2.5.0/lib/python3.9/site-packages/source/data_check.py", line 13, in <module>
    import source.data_utils
  File "/usr/local/soft/datacheck/venv-datacheck-2.5.0/lib/python3.9/site-packages/source/data_utils.py", line 9, in <module>
    from source.data_config import DataConfig
  File "/usr/local/soft/datacheck/venv-datacheck-2.5.0/lib/python3.9/site-packages/source/data_config.py", line 14, in <module>
    from source.sybase import SyBase
  File "/usr/local/soft/datacheck/venv-datacheck-2.5.0/lib/python3.9/site-packages/source/sybase.py", line 9, in <module>
    import pyodbc
ImportError: libodbc.so.2: cannot open shared object file: No such file or directory

3.5 安装 ODBC 库

sudo yum install unixODBC-devel -y

再次验证:

(venv-datacheck-2.5.0) [fbase@pg datacheck]$ datacheck -v

 ___       _         ___ _           _   
|   \ __ _| |_ __ _ / __| |_  ___ __| |__
| |) / _` |  _/ _` | (__| ' \/ -_) _| / /
|___/\__,_|\__\__,_|\___|_||_\___\__|_\_

--- DataCheck - FBaseDB data compare tools .
--- Version: 2.5.0
sqlplus sys/123456@XEPDB1 as sysdba

标签:__,datacheck,local,usr,packages,安装,python3.9
From: https://www.cnblogs.com/zreo2home/p/18376612

相关文章

  • Ubuntu安装arm交叉编译环境
    本地机是x86架构,目标机是arm64架构。CPU架构描述x86_64 /x86/amd6464位AMD/英特尔CPU的别称AArch64 /arm64/ARMv8/ARMv964位ARMCPU的别称i38632位AMD/英特尔CPUAArch32 /arm/ARMv1 到 ARMv732位ARMCPU的别称......
  • windows下安装es与elasticsearch报错
    发现网上很少关于windows安装elasticsearch的文章,所以本人结合一天的报错,解决问题的过程,写一下这篇文章,希望对大家有用,有帮助的话请点一个免费的赞,谢谢。安装es下载:点击https://www.elastic.co/cn/downloads/elasticsearch-->点击'Viewpastreleases'-->下拉栏中,找到7.10......
  • Java 调用电脑中安装的tesseract.exe进行图片中的文本方向识别
    StringimagePath="测试图片完整地址";StringtesseractPath="Tesseract安装路径\\tesseract.exe";ProcessBuilderprocessBuilder=newProcessBuilder(tesseractPath,imagePath,"stdout","--......
  • docker对的tomcat、mysql、redis、nginx的安装
    本章篇章主要讲解了docker对常用软件的安装说明总体步骤:搜索镜像、拉取镜像、查看镜像、启动镜像、停止容器、移除容器tomcatdockerseachertomcat//也可以在dockerhub上面查找tomcat镜像dockerpulltomcat从dockerhub上拉取tomcat镜像到本地dockerimages//查看是否......
  • centos7.6安装php7.3
    1:启用EPEL仓库sudoyuminstall-yepel-releaseyum-utils2.安装Remi仓库sudoyuminstall-yhttps://rpms.remirepo.net/enterprise/remi-release-7.rpm3:启用PHP7.3存储库sudoyum-config-manager--enableremi-php734:安装PHP7.3及其模块sudoyu......
  • CentOS 7.9 64位 使用docker安装软件过程
     CentOS7(使用yum进行安装docker):#step1:安装必要的一些系统工具sudoyuminstall-yyum-utilsdevice-mapper-persistent-datalvm2#Step2:添加软件源信息sudoyum-config-manager--add-repohttps://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo#St......
  • linux 安装 jenkins
    1、下载jenkinswar安装包官方地址:https://www.jenkins.io/download/注:需要注意jenkins版本和jkd版本匹配问题2、将war包上传服务器,启动war包即可启动命令:nohupjava-Djava.awt.headless=true-Djava.io.tmpdir=/data/jenkins/jenkins_home/tmp-jarjenkins-*.*.war--http......
  • MacBook Air M1 使用 miniconda 安装python3.11.7 和 tensorflow2.16.1详细
    1m1mac安装xcode命令工具在Terminal终端执行以下代码:xcode-select--install2下载支持m1芯片arm64的miniconda在miniconda官网,找到下图中保护AppleM1的bash安装包,Miniconda—Anacondadocumentation3安装miniconda在Terminal执行下列代码:1)cd"miniconda下......
  • openEuler安装openGauss5.0单机数据库
    1、操作系统配置说明:本次测试中,同时安装了两个版本的openEuler操作系统,分别是openEuler23.09和openEuler22.03。操作系统下载地址如下:https://www.openeuler.org/en/download[gauss@openGauss:/home/gauss]$cat/etc/os-releaseNAME="openEuler"VERSION="23.09"ID="op......
  • 物联网安装调试员:振兴杯全国青年职业技能大赛背后的人才培养
    一、物联网安装调试员职业概述1.1职业定义物联网安装调试员是信息时代下新兴的职业之一,他们利用先进的检测仪器和专用工具,负责物联网产品的安装、配置和调试工作。这项工作的核心是确保物联网设备能够高效、稳定地运行,实现数据的互联互通。他们需要具备物联网基础知识、......