|
|
pip install mysqlclient7 o& V2 Y# R+ h+ [7 A! D0 e
Collecting mysqlclient
' m; m+ j2 k: q+ N6 t; B Using cached mysqlclient-2.2.4.tar.gz (90 kB)
1 I3 G% u; a- B; n5 ~ Installing build dependencies ... done! a, _* y# l0 o! C% A. S
Getting requirements to build wheel ... done
( [4 @ ~" w. |/ e Preparing metadata (pyproject.toml) ... done W% [4 g4 F5 K! [
Building wheels for collected packages: mysqlclient
_0 u% y5 j" B) C8 U$ r! }3 r Building wheel for mysqlclient (pyproject.toml) ... error
" b8 Z: l* U. {6 O6 x0 f( w5 y2 z error: subprocess-exited-with-error: _* S6 ?$ G+ P
( i; {) }5 P- S. E) L1 S × Building wheel for mysqlclient (pyproject.toml) did not run successfully.
8 l4 u4 o6 `! p% ?; ]" f1 } │ exit code: 15 ?- @) R h( T5 D% v: o, T
╰─> [63 lines of output]" O9 A' k$ x+ z" r7 O$ V3 K, p5 N
# Options for building extension module:6 M" [ b! r# w! J" ]8 e+ W
extra_compile_args: ['-I/usr/include/mysql', '-std=c99']. y; S, V! ^/ t
extra_link_args: ['-L/usr/lib/x86_64-linux-gnu']
* l$ B3 a5 e5 |- ]) J% ^- v define_macros: [('version_info', (2, 2, 4, 'final', 0)), ('__version__', '2.2.4')]
4 l- a c. {# V! | running bdist_wheel
: b" F9 q6 Z) N3 |1 { running build. t5 c; |) B& n U. n& y/ ?
running build_py
& M* P9 U5 k1 s: D6 T. |- ] creating build) P" {" l5 _1 }, g+ y# V) v& F
creating build/lib.linux-x86_64-cpython-312
( u7 h, o9 v& Z6 K+ w* C creating build/lib.linux-x86_64-cpython-312/MySQLdb
: f3 C9 @) {0 [1 X j1 n copying src/MySQLdb/__init__.py -> build/lib.linux-x86_64-cpython-312/MySQLdb* `0 q; }2 [' {+ K: V/ x
copying src/MySQLdb/_exceptions.py -> build/lib.linux-x86_64-cpython-312/MySQLdb% Q, Z* w3 x, p
copying src/MySQLdb/connections.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
( {2 X! n5 c: [+ v copying src/MySQLdb/converters.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
3 U7 f5 R E J; N, C; ^1 t p copying src/MySQLdb/cursors.py -> build/lib.linux-x86_64-cpython-312/MySQLdb0 c* b6 j+ K; f6 M8 { V$ A6 h
copying src/MySQLdb/release.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
Z/ J# r0 q" A copying src/MySQLdb/times.py -> build/lib.linux-x86_64-cpython-312/MySQLdb1 a9 k$ r6 ^# w% t
creating build/lib.linux-x86_64-cpython-312/MySQLdb/constants
2 q. \3 N( ]2 y copying src/MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
3 R' ?. M/ a6 B. d. ~0 k' D' \% v copying src/MySQLdb/constants/CR.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
2 B# `* ?, I2 g N- D copying src/MySQLdb/constants/ER.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
R) J: v4 Z4 W' Y copying src/MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants3 c8 M) ^+ ]" m. l W, @
copying src/MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
g6 ]& n0 k# e' X: G copying src/MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
3 @, C1 @* I' }5 W running egg_info% ~4 _& ~. s4 s4 i
writing src/mysqlclient.egg-info/PKG-INFO
9 |, J+ v/ f% {6 x/ s8 G; g writing dependency_links to src/mysqlclient.egg-info/dependency_links.txt
0 F# s6 j3 _1 y9 B writing top-level names to src/mysqlclient.egg-info/top_level.txt
" ~/ ^3 D3 w" y7 I reading manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
4 y6 Z a* Z; i* l) R reading manifest template 'MANIFEST.in'' r4 q, J- a8 g3 L& q" F4 [' z
adding license file 'LICENSE'# @5 k( M* H& w) s/ M! J
writing manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
" ]+ J8 `. }) ^& u. E copying src/MySQLdb/_mysql.c -> build/lib.linux-x86_64-cpython-312/MySQLdb! u" u, n& p$ k) d$ w U: J! R
running build_ext: o/ n* d* ?9 |7 r! a' a
building 'MySQLdb._mysql' extension
7 ^' r: @! E2 a% | creating build/temp.linux-x86_64-cpython-3127 U4 r Z. O$ m. e, Z4 y0 e
creating build/temp.linux-x86_64-cpython-312/src
( F) }: q3 X* q' A# h& Z1 J creating build/temp.linux-x86_64-cpython-312/src/MySQLdb3 p' p% _1 o/ p9 b8 o: W' R' f& Z2 f# g
gcc -std=gnu11 -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC "-Dversion_info=(2, 2, 4, 'final', 0)" -D__version__=2.2.4 -I/usr/local/python312/include/python3.12 -c src/MySQLdb/_mysql.c -o build/temp.linux-x86_64-cpython-312/src/MySQLdb/_mysql.o -I/usr/include/mysql -std=c997 N- F* Q6 A! J$ t! T
src/MySQLdb/_mysql.c: 在函数‘_mysql_ConnectionObject_Initialize’中:5 s# \9 @+ |: c" R' r& f1 X
src/MySQLdb/_mysql.c:539:44: 错误:‘MYSQL_OPT_SSL_KEY’未声明(在此函数内第一次使用)
- T9 j& B7 {% L' [8 @1 x9 v: |1 T mysql_options(&(self->connection), MYSQL_OPT_SSL_KEY, key);6 q+ a5 U) r! t& c5 O
^3 w" D# Y+ z7 t R. P7 L7 G
src/MySQLdb/_mysql.c:539:44: 附注:每个未声明的标识符在其出现的函数内只报告一次
- d! e; t, e3 Y4 n# ? src/MySQLdb/_mysql.c:540:44: 错误:‘MYSQL_OPT_SSL_CERT’未声明(在此函数内第一次使用). c2 B* W% D! n4 N# D4 ]4 Y
mysql_options(&(self->connection), MYSQL_OPT_SSL_CERT, cert);# v$ h0 G4 e; u9 Q
^: \: u5 S! ?' F& u
src/MySQLdb/_mysql.c:541:44: 错误:‘MYSQL_OPT_SSL_CA’未声明(在此函数内第一次使用)
/ d$ e- p- \2 O mysql_options(&(self->connection), MYSQL_OPT_SSL_CA, ca);6 m! Y1 L0 G* o
^( B+ l. _: |9 @2 H4 g
src/MySQLdb/_mysql.c:542:44: 错误:‘MYSQL_OPT_SSL_CAPATH’未声明(在此函数内第一次使用)
2 ?; `5 O' q- w* e mysql_options(&(self->connection), MYSQL_OPT_SSL_CAPATH, capath);
8 u7 L8 [# ?1 U ^! {+ ]( e8 C1 q
src/MySQLdb/_mysql.c:543:44: 错误:‘MYSQL_OPT_SSL_CIPHER’未声明(在此函数内第一次使用)
$ \0 ~$ L& V/ h* J1 q" c9 K( ^4 s mysql_options(&(self->connection), MYSQL_OPT_SSL_CIPHER, cipher);
, t- C/ ~& m6 p( p2 o6 y ^4 M# \3 n1 U+ C/ z* P% P
src/MySQLdb/_mysql.c:556:13: 警告:隐式声明函数‘mysql_optionsv’ [-Wimplicit-function-declaration]
8 _' |3 j$ {6 o: r mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls);
# w3 h6 P) U! ? ^5 x6 J% u' l# N( L! P! b
src/MySQLdb/_mysql.c:556:49: 错误:‘MYSQL_OPT_SSL_ENFORCE’未声明(在此函数内第一次使用)
- W* _% H" f, M: M1 j$ \ mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls);. G# ?, {# Z4 i3 [7 s% p
^
0 R% d4 D8 S% n+ m, k3 N0 k: K error: command '/usr/bin/gcc' failed with exit code 1; ` @) V, H9 ^5 u
[end of output]
p& k* V% G% j/ a
2 [: O9 L9 e" C5 R1 _# H) {% ~ note: This error originates from a subprocess, and is likely not a problem with pip.1 k9 P. Z" \# m) w! }/ W& W- v# g/ Z
ERROR: Failed building wheel for mysqlclient6 U$ ^# T% w8 W, f3 a
Failed to build mysqlclient$ H$ L4 I* e% S' s
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (mysqlclient)
/ P& x. e1 ?' \& ~3 ^/ ~$ U; H% c" R7 S [0 O
3 h- u0 x% O4 h: d% d$ Y) Q5 B/ s7 Q+ t
4 {! J$ E# H5 Y/ ]3 p解决方法:2 v: G5 `; f9 k$ |$ f3 j
8 |! H% _ R- m& C3 {4 q- i
降低mysqlclient 版本,替换mysqlclient-2.0.2 为1:; u3 c: ?+ G% m8 V
" X- z6 k) e+ y) k5 N/ @& xapache-airflow-providers-mysql==5.4.0' ]. z& t2 T0 Z! g
mysqlclient==2.1.0
1 H+ Z W' J/ X9 K: Q& i) o3 e* j' g) a7 s. p8 m0 i$ O% B
- ?8 c0 I" z- n3 u* k* }/ e: {* L8 X# j* E- o: R: P
|
|