微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

OSError: 在 Fedora 上安装 mysqldb 1.3.7 时找不到 mysql_config

如何解决OSError: 在 Fedora 上安装 mysqldb 1.3.7 时找不到 mysql_config

对于一个项目,我必须安装特定版本的 MysqLclient==1.3.7 。但是我收到错误:似乎缺少 MysqL_config

(venv) [ac@localmachine data-tools]$ python -m pip install MysqLclient==1.3.7
Collecting MysqLclient==1.3.7
  Using cached MysqLclient-1.3.7.tar.gz (79 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/ac/Documents/Programming/Work/data-tools/venv/bin/python -c 'import io,os,sys,setuptools,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tso5g_cy/MysqLclient_4957ca0023294aaf907cc37f2312dd8c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tso5g_cy/MysqLclient_4957ca0023294aaf907cc37f2312dd8c/setup.py'"'"';f = getattr(tokenize,'"'"'open'"'"',open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-dt7pv4kk
         cwd: /tmp/pip-install-tso5g_cy/MysqLclient_4957ca0023294aaf907cc37f2312dd8c/
    Complete output (10 lines):
    /bin/sh: line 1: MysqL_config: command not found
    Traceback (most recent call last):
      File "<string>",line 1,in <module>
      File "/tmp/pip-install-tso5g_cy/MysqLclient_4957ca0023294aaf907cc37f2312dd8c/setup.py",line 17,in <module>
        Metadata,options = get_config()
      File "/tmp/pip-install-tso5g_cy/MysqLclient_4957ca0023294aaf907cc37f2312dd8c/setup_posix.py",line 44,in get_config
        libs = MysqL_config("libs_r")
      File "/tmp/pip-install-tso5g_cy/MysqLclient_4957ca0023294aaf907cc37f2312dd8c/setup_posix.py",line 26,in MysqL_config
        raise EnvironmentError("%s not found" % (MysqL_config.path,))
    OSError: MysqL_config not found
    ----------------------------------------
WARNING: discarding https://files.pythonhosted.org/packages/74/ff/4e964e20b559e55d7afa60fbccc6a560f2adf289813bd3d7eb4eb8a87093/MysqLclient-1.3.7.tar.gz#sha256=c74a83b4cb2933d0e43370117eeebdfa03077ae72686d2df43d31879267f1f1b (from https://pypi.org/simple/MysqLclient/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement MysqLclient==1.3.7 (from versions: 1.3.0,1.3.1,1.3.2,1.3.3,1.3.4,1.3.5,1.3.6,1.3.7,1.3.8,1.3.9,1.3.10,1.3.11rc1,1.3.11,1.3.12,1.3.13,1.3.14,1.4.0rc1,1.4.0rc2,1.4.0rc3,1.4.0,1.4.1,1.4.2,1.4.2.post1,1.4.3,1.4.4,1.4.5,1.4.6,2.0.0,2.0.1,2.0.2,2.0.3)
ERROR: No matching distribution found for MysqLclient==1.3.7

所以我安装了 community-MysqL-devel 并重新运行:

(venv) [ac@localmachine data-tools]$ python -m pip install MysqLclient==1.3.7
Collecting MysqLclient==1.3.7
  Using cached MysqLclient-1.3.7.tar.gz (79 kB)
Using legacy 'setup.py install' for MysqLclient,since package 'wheel' is not installed.
Installing collected packages: MysqLclient
    Running setup.py install for MysqLclient ... error
    ERROR: Command errored out with exit status 1:
     command: /home/ac/Documents/Programming/Work/data-tools/venv/bin/python -u -c 'import io,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7okc9y_x/MysqLclient_b4db68125912451d81875f39d142c9ee/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7okc9y_x/MysqLclient_b4db68125912451d81875f39d142c9ee/setup.py'"'"';f = getattr(tokenize,'"'"'exec'"'"'))' install --record /tmp/pip-record-znhsqlja/install-record.txt --single-version-externally-managed --compile --install-headers /home/ac/Documents/Programming/Work/data-tools/venv/include/site/python3.9/MysqLclient
         cwd: /tmp/pip-install-7okc9y_x/MysqLclient_b4db68125912451d81875f39d142c9ee/
    Complete output (35 lines):
    /home/ac/Documents/Programming/Work/data-tools/venv/lib64/python3.9/site-packages/setuptools/dist.py:691: UserWarning: Usage of dash-separated 'distribution-name' will not be supported in future versions. Please use the underscore name 'distribution_name' instead
      warnings.warn(
    /home/ac/Documents/Programming/Work/data-tools/venv/lib64/python3.9/site-packages/setuptools/dist.py:691: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead
      warnings.warn(
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.9
    copying _MysqL_exceptions.py -> build/lib.linux-x86_64-3.9
    creating build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/__init__.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/compat.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/converters.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/connections.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/cursors.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/release.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/times.py -> build/lib.linux-x86_64-3.9/MysqLdb
    creating build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/__init__.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/CR.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/ER.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/REFRESH.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    running build_ext
    building '_MysqL' extension
    creating build/temp.linux-x86_64-3.9
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,3,7,'final',1) -D__version__=1.3.7 -I/usr/include/MysqL -I/home/ac/Documents/Programming/Work/data-tools/venv/include -I/usr/include/python3.9 -c _MysqL.c -o build/temp.linux-x86_64-3.9/_MysqL.o -m64
    _MysqL.c:29:10: Fatal error: my_config.h: No such file or directory
       29 | #include "my_config.h"
          |          ^~~~~~~~~~~~~
    compilation terminated.
    error: command '/usr/bin/gcc' Failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: 
/home/ac/Documents/Programming/Work/data-tools/venv/bin/python -u -c 
'import io,tokenize; sys.argv[0] = 
'"'"'/tmp/pip-install 7okc9y_x/MysqLclient_b4db68125912451d81875f39d142c9ee/setup.py'"'"'; __file__='"'"'/tmp/pip-install okc9y_x/MysqLclient_b4db68125912451d81875f39d142c9ee/setup.py'"'"';f = getattr(tokenize,'"'"'exec'"'"'))' install --record /tmp/pip-record-znhsqlja/install-record.txt --single-version-externally-managed --compile --install-headers /home/ac/Documents/Programming/Work/data-tools/venv/include/site/python3.9/MysqLclient Check the logs for full command output.

因为轮子似乎缺少,我也尝试安装它:

(venv) [ac@localmachine data-tools]$ python -m pip install wheel
Collecting wheel
  Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.36.2

但这还不够

(venv) [ac@localmachine data-tools]$ python -m pip install MysqLclient==1.3.7
Collecting MysqLclient==1.3.7
  Using cached MysqLclient-1.3.7.tar.gz (79 kB)
Building wheels for collected packages: MysqLclient
  Building wheel for MysqLclient (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ac/Documents/Programming/Work/data-tools/venv/bin/python -u -c 'import io,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6n9fzb6y/MysqLclient_c3d7b33fbad748f1b57a8ca294cb6ea1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6n9fzb6y/MysqLclient_c3d7b33fbad748f1b57a8ca294cb6ea1/setup.py'"'"';f = getattr(tokenize,'"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-_20ndtkd
       cwd: /tmp/pip-install-6n9fzb6y/MysqLclient_c3d7b33fbad748f1b57a8ca294cb6ea1/
  Complete output (35 lines):
  /home/ac/Documents/Programming/Work/data-tools/venv/lib64/python3.9/site-packages/setuptools/dist.py:691: UserWarning: Usage of dash-separated 'distribution-name' will not be supported in future versions. Please use the underscore name 'distribution_name' instead
    warnings.warn(
  /home/ac/Documents/Programming/Work/data-tools/venv/lib64/python3.9/site-packages/setuptools/dist.py:691: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead
    warnings.warn(
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.9
  copying _MysqL_exceptions.py -> build/lib.linux-x86_64-3.9
  creating build/lib.linux-x86_64-3.9/MysqLdb
  ...
  running build_ext
  building '_MysqL' extension
  creating build/temp.linux-x86_64-3.9
  gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -... I/home/ac/Documents/Programming/Work/data-tools/venv/include -I/usr/include/python3.9 -c _MysqL.c -o build/temp.linux-x86_64-3.9/_MysqL.o -m64
  _MysqL.c:29:10: Fatal error: my_config.h: No such file or directory
     29 | #include "my_config.h"
        |          ^~~~~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/gcc' Failed with exit code 1
 ...
    _MysqL.c:29:10: Fatal error: my_config.h: No such file or directory
       29 | #include "my_config.h"
          |          ^~~~~~~~~~~~~
    compilation terminated.
    error: command '/usr/bin/gcc' Failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ac/Documents/Programming/Work/data-tools/venv/bin/python -u -c 'import io,'"'"'exec'"'"'))' install --record /tmp/pip-record-9xyqzh6s/install-record.txt --single-version-externally-managed --compile --install-headers /home/ac/Documents/Programming/Work/data-tools/venv/include/site/python3.9/MysqLclient Check the logs for full command output.

更新

我确定没问题:

(venv) [ac@localmachine data-tools]$ python -m pip install MysqLclient==1.3.7
Collecting MysqLclient==1.3.7
  Using cached MysqLclient-1.3.7.tar.gz (79 kB)
Building wheels for collected packages: MysqLclient
  Building wheel for MysqLclient (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ac/Documents/Programming/Work/data-tools/venv/bin/python -u -c 'import io,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oc0b_tf0/MysqLclient_3c668220085e4790813f0fbf24ad3d06/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oc0b_tf0/MysqLclient_3c668220085e4790813f0fbf24ad3d06/setup.py'"'"';f = getattr(tokenize,'"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-0vacq2_s
       cwd: /tmp/pip-install-oc0b_tf0/MysqLclient_3c668220085e4790813f0fbf24ad3d06/
  Complete output (81 lines):
  /home/ac/Documents/Programming/Work/data-tools/venv/lib64/python3.9/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'distribution-name' will not be supported in future versions. Please use the underscore name 'distribution_name' instead
    warnings.warn(
  /home/ac/Documents/Programming/Work/data-tools/venv/lib64/python3.9/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead
    warnings.warn(
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.9
  copying _MysqL_exceptions.py -> build/lib.linux-x86_64-3.9
  creating build/lib.linux-x86_64-3.9/MysqLdb
  copying MysqLdb/__init__.py -> build/lib.linux-x86_64-3.9/MysqLdb
  copying MysqLdb/compat.py -> build/lib.linux-x86_64-3.9/MysqLdb
  copying MysqLdb/converters.py -> build/lib.linux-x86_64-3.9/MysqLdb
  copying MysqLdb/connections.py -> build/lib.linux-x86_64-3.9/MysqLdb
  copying MysqLdb/cursors.py -> build/lib.linux-x86_64-3.9/MysqLdb
  copying MysqLdb/release.py -> build/lib.linux-x86_64-3.9/MysqLdb
  copying MysqLdb/times.py -> build/lib.linux-x86_64-3.9/MysqLdb
  creating build/lib.linux-x86_64-3.9/MysqLdb/constants
  copying MysqLdb/constants/__init__.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
  copying MysqLdb/constants/CR.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
  copying MysqLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
  copying MysqLdb/constants/ER.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
  copying MysqLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
  copying MysqLdb/constants/REFRESH.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
  copying MysqLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
  running build_ext
  building '_MysqL' extension
  creating build/temp.linux-x86_64-3.9
  gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,1) -D__version__=1.3.7 -I/usr/include/MysqL -I/usr/include/MysqL/MysqL -I/home/ac/Documents/Programming/Work/data-tools/venv/include -I/usr/include/python3.9 -c _MysqL.c -o build/temp.linux-x86_64-3.9/_MysqL.o
  In file included from _MysqL.c:29:
  /usr/include/MysqL/my_config.h:3:2: warning: #warning This file should not be included by clients,include only <MysqL.h> [-Wcpp]
      3 | #warning This file should not be included by clients,include only <MysqL.h>
        |  ^~~~~~~
  _MysqL.c: In function ‘_MysqL_server_init’:
  _MysqL.c:275:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    275 |                         s = PyUnicode_AsUTF8(item);
        |                           ^
  _MysqL.c:305:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    305 |                         s = PyUnicode_AsUTF8(item);
        |                           ^
  _MysqL.c: In function ‘_MysqL_ConnectionObject_Initialize’:
  _MysqL.c:589:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    589 |         if(t){d=PyUnicode_AsUTF8(t);Py_DECREF(t);}\
        |                ^
  _MysqL.c:600:17: note: in expansion of macro ‘_stringsuck’
    600 |                 _stringsuck(ca,value,ssl);
        |                 ^~~~~~~~~~~
  _MysqL.c:589:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    589 |         if(t){d=PyUnicode_AsUTF8(t);Py_DECREF(t);}\
        |                ^
  _MysqL.c:601:17: note: in expansion of macro ‘_stringsuck’
    601 |                 _stringsuck(capath,ssl);
        |                 ^~~~~~~~~~~
  _MysqL.c:589:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    589 |         if(t){d=PyUnicode_AsUTF8(t);Py_DECREF(t);}\
        |                ^
  _MysqL.c:602:17: note: in expansion of macro ‘_stringsuck’
    602 |                 _stringsuck(cert,ssl);
        |                 ^~~~~~~~~~~
  _MysqL.c:589:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    589 |         if(t){d=PyUnicode_AsUTF8(t);Py_DECREF(t);}\
        |                ^
  _MysqL.c:603:17: note: in expansion of macro ‘_stringsuck’
    603 |                 _stringsuck(key,ssl);
        |                 ^~~~~~~~~~~
  _MysqL.c:589:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    589 |         if(t){d=PyUnicode_AsUTF8(t);Py_DECREF(t);}\
        |                ^
  _MysqL.c:604:17: note: in expansion of macro ‘_stringsuck’
    604 |                 _stringsuck(cipher,ssl);
        |                 ^~~~~~~~~~~
  _MysqL.c: In function ‘_MysqL_ConnectionObject_ping’:
  _MysqL.c:1968:48: error: ‘MysqL’ {aka ‘struct st_MysqL’} has no member named ‘reconnect’
   1968 |         if ( reconnect != -1 ) self->connection.reconnect = reconnect;
        |                                                ^
  _MysqL.c: In function ‘_MysqL_ConnectionObject_getattro’:
  _MysqL.c:2675:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   2675 |         cname = PyUnicode_AsUTF8(name);
        |               ^
  error: command '/usr/bin/gcc' Failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for MysqLclient
  Running setup.py clean for MysqLclient
Failed to build MysqLclient
Installing collected packages: MysqLclient
    Running setup.py install for MysqLclient ... error
    ERROR: Command errored out with exit status 1:
     command: /home/ac/Documents/Programming/Work/data-tools/venv/bin/python -u -c 'import io,'"'"'exec'"'"'))' install --record /tmp/pip-record-yhrboba8/install-record.txt --single-version-externally-managed --compile --install-headers /home/ac/Documents/Programming/Work/data-tools/venv/include/site/python3.9/MysqLclient
         cwd: /tmp/pip-install-oc0b_tf0/MysqLclient_3c668220085e4790813f0fbf24ad3d06/
    Complete output (81 lines):
    /home/ac/Documents/Programming/Work/data-tools/venv/lib64/python3.9/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'distribution-name' will not be supported in future versions. Please use the underscore name 'distribution_name' instead
      warnings.warn(
    /home/ac/Documents/Programming/Work/data-tools/venv/lib64/python3.9/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead
      warnings.warn(
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.9
    copying _MysqL_exceptions.py -> build/lib.linux-x86_64-3.9
    creating build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/__init__.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/compat.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/converters.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/connections.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/cursors.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/release.py -> build/lib.linux-x86_64-3.9/MysqLdb
    copying MysqLdb/times.py -> build/lib.linux-x86_64-3.9/MysqLdb
    creating build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/__init__.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/CR.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/ER.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/REFRESH.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    copying MysqLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.9/MysqLdb/constants
    running build_ext
    building '_MysqL' extension
    creating build/temp.linux-x86_64-3.9
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,1) -D__version__=1.3.7 -I/usr/include/MysqL -I/usr/include/MysqL/MysqL -I/home/ac/Documents/Programming/Work/data-tools/venv/include -I/usr/include/python3.9 -c _MysqL.c -o build/temp.linux-x86_64-3.9/_MysqL.o
    In file included from _MysqL.c:29:
    /usr/include/MysqL/my_config.h:3:2: warning: #warning This file should not be included by clients,include only <MysqL.h> [-Wcpp]
        3 | #warning This file should not be included by clients,include only <MysqL.h>
          |  ^~~~~~~
    _MysqL.c: In function ‘_MysqL_server_init’:
    _MysqL.c:275:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      275 |                         s = PyUnicode_AsUTF8(item);
          |                           ^
    _MysqL.c:305:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      305 |                         s = PyUnicode_AsUTF8(item);
          |                           ^
    _MysqL.c: In function ‘_MysqL_ConnectionObject_Initialize’:
    _MysqL.c:589:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      589 |         if(t){d=PyUnicode_AsUTF8(t);Py_DECREF(t);}\
          |                ^
    _MysqL.c:600:17: note: in expansion of macro ‘_stringsuck’
      600 |                 _stringsuck(ca,ssl);
          |                 ^~~~~~~~~~~
    _MysqL.c:589:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      589 |         if(t){d=PyUnicode_AsUTF8(t);Py_DECREF(t);}\
          |                ^
    _MysqL.c:601:17: note: in expansion of macro ‘_stringsuck’
      601 |                 _stringsuck(capath,ssl);
          |                 ^~~~~~~~~~~
    _MysqL.c:589:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      589 |         if(t){d=PyUnicode_AsUTF8(t);Py_DECREF(t);}\
          |                ^
    _MysqL.c:602:17: note: in expansion of macro ‘_stringsuck’
      602 |                 _stringsuck(cert,ssl);
          |                 ^~~~~~~~~~~
    _MysqL.c:589:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      589 |         if(t){d=PyUnicode_AsUTF8(t);Py_DECREF(t);}\
          |                ^
    _MysqL.c:603:17: note: in expansion of macro ‘_stringsuck’
      603 |                 _stringsuck(key,ssl);
          |                 ^~~~~~~~~~~
    _MysqL.c:589:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      589 |         if(t){d=PyUnicode_AsUTF8(t);Py_DECREF(t);}\
          |                ^
    _MysqL.c:604:17: note: in expansion of macro ‘_stringsuck’
      604 |                 _stringsuck(cipher,ssl);
          |                 ^~~~~~~~~~~
    _MysqL.c: In function ‘_MysqL_ConnectionObject_ping’:
    _MysqL.c:1968:48: error: ‘MysqL’ {aka ‘struct st_MysqL’} has no member named ‘reconnect’
     1968 |         if ( reconnect != -1 ) self->connection.reconnect = reconnect;
          |                                                ^
    _MysqL.c: In function ‘_MysqL_ConnectionObject_getattro’:
    _MysqL.c:2675:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     2675 |         cname = PyUnicode_AsUTF8(name);
          |               ^
    error: command '/usr/bin/gcc' Failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ac/Documents/Programming/Work/data-tools/venv/bin/python -u -c 'import io,'"'"'exec'"'"'))' install --record /tmp/pip-record-yhrboba8/install-record.txt --single-version-externally-managed --compile --install-headers /home/ac/Documents/Programming/Work/data-tools/venv/include/site/python3.9/MysqLclient Check the logs for full command output.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?