Altinity / clickhouse-mysql-data-reader

utility to read mysql data
MIT License
368 stars 94 forks source link

installed python3.4 report missing read_text() function #203

Open linuxfan1 opened 1 year ago

linuxfan1 commented 1 year ago

AttributeError: 'PosixPath' object has no attribute 'read_text'

SamSpiri commented 1 year ago

Also have this issue. Error is

docker build -t clickhouse-mysql:latest .
[+] Building 4.7s (17/17) FINISHED                                                                                                              docker:default
 => [internal] load build definition from Dockerfile                                                                                                      0.0s
 => => transferring dockerfile: 621B                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                           0.0s
 => [internal] load metadata for docker.io/library/centos:7                                                                                               1.0s
 => [auth] library/centos:pull token for registry-1.docker.io                                                                                             0.0s
 => [ 1/13] FROM docker.io/library/centos:7@sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4                                       0.0s
 => CACHED [ 2/13] RUN yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm                                               0.0s
 => CACHED [ 3/13] RUN yum install -y epel-release                                                                                                        0.0s
 => CACHED [ 4/13] RUN curl -s https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh | bash                                      0.0s
 => CACHED [ 5/13] RUN yum install -y clickhouse-client                                                                                                   0.0s
 => CACHED [ 6/13] RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022                                                                         0.0s
 => CACHED [ 7/13] RUN yum install -y mysql-community-devel                                                                                               0.0s
 => CACHED [ 8/13] RUN yum install -y mariadb-devel                                                                                                       0.0s
 => CACHED [ 9/13] RUN yum install -y gcc                                                                                                                 0.0s
 => CACHED [10/13] RUN yum install -y python34-devel                                                                                                      0.0s
 => CACHED [11/13] RUN curl -O https://bootstrap.pypa.io/pip/3.4/get-pip.py                                                                               0.0s
 => CACHED [12/13] RUN python3.4 get-pip.py                                                                                                               0.0s
 => ERROR [13/13] RUN pip3.4 install clickhouse-mysql                                                                                                     3.7s
------                                                                                                                                                         
 > [13/13] RUN pip3.4 install clickhouse-mysql:                                                                                                                
0.672 DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).                                                                                                                           
0.697 Collecting clickhouse-mysql                                                                                                                              
1.043   Downloading https://files.pythonhosted.org/packages/4b/aa/8bdd67ead1059c7e57eb6a3f6bea14c82924de357e4f11fdaa77bf2cad21/clickhouse_mysql-0.0.20200128-py3-none-any.whl (56kB)
1.133 Collecting mysqlclient (from clickhouse-mysql)
1.238   Downloading https://files.pythonhosted.org/packages/d0/97/7326248ac8d5049968bf4ec708a5d3d4806e412a42e74160d7f266a3e03a/mysqlclient-1.4.6.tar.gz (85kB)
1.692 Collecting configobj (from clickhouse-mysql)
1.762   Downloading https://files.pythonhosted.org/packages/90/11/28e9678700acd4a50e2ecec7eee2614e0f57e1ca70ddee70168241728c27/configobj-5.0.7-py2.py3-none-any.whl
1.782 Collecting mysql-replication (from clickhouse-mysql)
1.877   Downloading https://files.pythonhosted.org/packages/d5/2a/dd115e90daebaaea6d141729e0abd5503cf131bbce5876e1119f758f1381/mysql-replication-1.0.3.tar.gz (68kB)
1.905   Installing build dependencies: started
3.294   Installing build dependencies: finished with status 'done'
3.295   Getting requirements to build wheel: started
3.545   Getting requirements to build wheel: finished with status 'error'
3.545   ERROR: Complete output from command /usr/bin/python3.4 /usr/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpmcap858_:
3.545   ERROR: Traceback (most recent call last):
3.545     File "/usr/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
3.545       main()
3.545     File "/usr/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
3.545       json_out['return_val'] = hook(**hook_input['kwargs'])
3.545     File "/usr/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py", line 54, in get_requires_for_build_wheel
3.545       return hook(config_settings)
3.545     File "/tmp/pip-build-env-w4wepz1e/overlay/lib/python3.4/site-packages/setuptools/build_meta.py", line 146, in get_requires_for_build_wheel
3.545       return self._get_build_requires(config_settings, requirements=['wheel'])
3.545     File "/tmp/pip-build-env-w4wepz1e/overlay/lib/python3.4/site-packages/setuptools/build_meta.py", line 127, in _get_build_requires
3.545       self.run_setup()
3.545     File "/tmp/pip-build-env-w4wepz1e/overlay/lib/python3.4/site-packages/setuptools/build_meta.py", line 237, in run_setup
3.545       self).run_setup(setup_script=setup_script)
3.545     File "/tmp/pip-build-env-w4wepz1e/overlay/lib/python3.4/site-packages/setuptools/build_meta.py", line 142, in run_setup
3.545       exec(compile(code, __file__, 'exec'), locals())
3.545     File "setup.py", line 34, in <module>
3.545       long_description = (this_directory / "README.md").read_text()
3.545   AttributeError: 'PosixPath' object has no attribute 'read_text'
3.545   ----------------------------------------
3.575 ERROR: Command "/usr/bin/python3.4 /usr/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpmcap858_" failed with error code 1 in /tmp/pip-install-m7xhtjiu/mysql-replication
------
Dockerfile:14
--------------------
  12 |     RUN curl -O https://bootstrap.pypa.io/pip/3.4/get-pip.py
  13 |     RUN python3.4 get-pip.py
  14 | >>> RUN pip3.4 install clickhouse-mysql
--------------------
ERROR: failed to solve: process "/bin/sh -c pip3.4 install clickhouse-mysql" did not complete successfully: exit code: 1

I'm building this Dockerfile:

FROM centos:7

RUN yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
RUN yum install -y epel-release
RUN curl -s https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh | bash
RUN yum install -y clickhouse-client
RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
RUN yum install -y mysql-community-devel
RUN yum install -y mariadb-devel
RUN yum install -y gcc
RUN yum install -y python34-devel
RUN curl -O https://bootstrap.pypa.io/pip/3.4/get-pip.py
RUN python3.4 get-pip.py
RUN pip3.4 install clickhouse-mysql