[CONPY-89] MariaDB Connector/C Created: 2020-07-22  Updated: 2020-07-22  Resolved: 2020-07-22

Status: Closed
Project: MariaDB Connector/Python
Component/s: Installation
Affects Version/s: 1.0.0
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Alexander Assignee: Georg Richter
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

CentOS 7, RedHat, 10.5.4-MariaDB MariaDB Server



 Description   

Sehr geehrte Damen und Herren,

Ziel: über python den MariaDB Connector/C nutzen.

Gegeben:

  • Server version: 10.5.4-MariaDB MariaDB Server
  • CentOS 7, RedHat
  • python2 und python3

Problem 1:
###########
Instruction:
-----------------

Step:
------------

  • Step: sudo ./mariadb_es_repo_setup --token="customer_download_token" --apply \
    --mariadb-server-version="10.5"

Fehler:
-----------
[error] Invalid token. Please verify that it is correct.
Your token can be viewed at:
https://tools.mariadb.com/portal/downloads/token/

Problem 2:
########
Instruction:
-----------------
https://mariadb.com/resources/blog/how-to-connect-python-programs-to-mariadb/

Step:
------------
$ pip3 install mariadb

Fehler:
-----------

Collecting mariadb
Using cached mariadb-1.0.0.tar.gz (78 kB)
Building wheels for collected packages: mariadb
Building wheel for mariadb (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bucjd3tu/mariadb/setup.py'"'"'; _file='"'"'/tmp/pip-install-bucjd3tu/mariadb/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-z0ci1tir
cwd: /tmp/pip-install-bucjd3tu/mariadb/
Complete output (14 lines):
running bdist_wheel
running build
running build_ext
building 'mariadb' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=0 -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/usr/include/python3.6m -c src/mariadb.c -o build/temp.linux-x86_64-3.6/src/mariadb.o -DDEFAULT_PLUGINS_SUBDIR="/usr/lib64/mysql/plugin"
In file included from src/mariadb.c:21:0:
./include/mariadb_python.h:20:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for mariadb
Running setup.py clean for mariadb
Failed to build mariadb
Installing collected packages: mariadb
Running setup.py install for mariadb ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bucjd3tu/mariadb/setup.py'"'"'; _file='"'"'/tmp/pip-install-bucjd3tu/mariadb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file_, '"'"'exec'"'"'))' install --record /tmp/pip-record-uo7o501h/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/mariadb
cwd: /tmp/pip-install-bucjd3tu/mariadb/
Complete output (14 lines):
running install
running build
running build_ext
building 'mariadb' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=0 -DPY_MARIADB_PATCH_VERSION=0 -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/usr/include/python3.6m -c src/mariadb.c -o build/temp.linux-x86_64-3.6/src/mariadb.o -DDEFAULT_PLUGINS_SUBDIR="/usr/lib64/mysql/plugin"
In file included from src/mariadb.c:21:0:
./include/mariadb_python.h:20:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bucjd3tu/mariadb/setup.py'"'"'; _file='"'"'/tmp/pip-install-bucjd3tu/mariadb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file_, '"'"'exec'"'"'))' install --record /tmp/pip-record-uo7o501h/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/mariadb Check the logs for full command output.

Vielen Dank für die Hilfe

Alexander



 Comments   
Comment by Georg Richter [ 2020-07-22 ]

1) Please don't file several issues in one bug report. For ES problem please open a separate ticket.
2) Please file bug reports in English, the majority of our colleagues and users doesn't understand German.

For the installation problem make sure that a recent version of python-devel package is installed (>= 3.6) and make sure that the directory containing Python.h is in your include environment variable.

Comment by Alexander [ 2020-07-22 ]

Oh sorry ... for the next time I do this.

Thank you for the note. It was helpful.

regards

Alexander

Generated at Thu Feb 08 03:30:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.