- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
pip install mysqlclient' B/ S& r) X% Z! J
Collecting mysqlclient: }& Y0 C' W/ E" \
Using cached mysqlclient-2.2.4.tar.gz (90 kB)
$ |( I! M" A9 O1 U4 j Installing build dependencies ... done
% S1 y' q' u6 i8 ?; M+ P Getting requirements to build wheel ... done
/ z' n! q$ @/ t4 ~ Preparing metadata (pyproject.toml) ... done
! k3 n) J W3 V6 ]8 l5 OBuilding wheels for collected packages: mysqlclient4 X5 @0 J/ ~: I2 x. D! x8 s' j
Building wheel for mysqlclient (pyproject.toml) ... error
2 W) Y+ }( g+ w. V4 _9 K/ T5 ~ error: subprocess-exited-with-error$ g) U# A5 v7 \; K% d! c1 Y
9 ]& E r' Y3 |
× Building wheel for mysqlclient (pyproject.toml) did not run successfully." p% J/ }* L/ \& @3 B, h, g( E
│ exit code: 1
- D) P' x6 j: n2 H9 h2 T6 s; G ╰─> [63 lines of output]0 j3 u$ }) e' O; s1 V
# Options for building extension module:
# x6 w" Z1 z! k& ] i0 | extra_compile_args: ['-I/usr/include/mysql', '-std=c99']
* S! `* l7 D7 [( k/ W: D extra_link_args: ['-L/usr/lib/x86_64-linux-gnu']; C/ c/ \1 z7 r
define_macros: [('version_info', (2, 2, 4, 'final', 0)), ('__version__', '2.2.4')]5 E; @$ g; L8 V/ H( x; s* }/ j
running bdist_wheel5 t1 U' z$ d/ n" I$ b9 e
running build
7 U( A) N8 p6 G9 s' ~3 _ running build_py
" d. @# M( x0 p creating build+ y3 a! E4 E: P3 H, P0 S x
creating build/lib.linux-x86_64-cpython-3129 F f# }0 { R
creating build/lib.linux-x86_64-cpython-312/MySQLdb
3 X8 r/ R; F4 V) j8 D& X copying src/MySQLdb/__init__.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
' R. |$ m( U4 ?+ ^7 @ copying src/MySQLdb/_exceptions.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
2 x) _1 T. v- k6 S copying src/MySQLdb/connections.py -> build/lib.linux-x86_64-cpython-312/MySQLdb& R6 K W3 S, M) S2 L8 E' h7 t. i1 [
copying src/MySQLdb/converters.py -> build/lib.linux-x86_64-cpython-312/MySQLdb) S& `- E) t6 T' }4 O
copying src/MySQLdb/cursors.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
2 L8 ?' [( @1 p0 I9 W3 n copying src/MySQLdb/release.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
. [* K$ @( ]5 j, ]5 y copying src/MySQLdb/times.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
, {, q+ p' z0 A1 z/ g creating build/lib.linux-x86_64-cpython-312/MySQLdb/constants5 a$ C6 i/ u' l2 Z
copying src/MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
" {0 M, \8 k6 ]! U$ p1 C6 d copying src/MySQLdb/constants/CR.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants8 r! h& R" z5 w1 B) w
copying src/MySQLdb/constants/ER.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
0 b. N* Q3 h2 a- S# Y' ^ copying src/MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants4 r& x# M9 J5 [, V7 l
copying src/MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
& `+ a, Q/ z6 e! ~) w copying src/MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants' Z+ y& S8 [! J4 g
running egg_info, N. r7 F+ G, H
writing src/mysqlclient.egg-info/PKG-INFO
( \5 a. A2 a' ^, } writing dependency_links to src/mysqlclient.egg-info/dependency_links.txt/ P4 f' G8 E& d0 ?% u& X; N1 t
writing top-level names to src/mysqlclient.egg-info/top_level.txt
; d5 O6 q/ M4 I reading manifest file 'src/mysqlclient.egg-info/SOURCES.txt'- C- B3 R8 y- r }" y$ `4 T# V$ i
reading manifest template 'MANIFEST.in'4 e8 s0 M, L- |
adding license file 'LICENSE'+ {$ z" ~2 @( d: M5 S. J) w0 I
writing manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
2 X! z: ]& H" f6 m0 y" G: \ copying src/MySQLdb/_mysql.c -> build/lib.linux-x86_64-cpython-312/MySQLdb
3 _" g4 m! \5 f running build_ext$ r! S8 a/ ?+ q" D$ O+ h
building 'MySQLdb._mysql' extension' ?3 Z6 i( h, l* p" |& A# ^
creating build/temp.linux-x86_64-cpython-312
7 Z) n2 o1 X/ s" B" M1 Z creating build/temp.linux-x86_64-cpython-312/src
; G" y$ f7 S: U0 m5 f creating build/temp.linux-x86_64-cpython-312/src/MySQLdb: ]" B; B6 q$ {: D4 b, K* U
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=c99/ g0 q8 m& ~" G+ X& f+ L$ s: N
src/MySQLdb/_mysql.c: 在函数‘_mysql_ConnectionObject_Initialize’中:
3 I0 r: a0 s2 R4 i d3 k2 M0 ?' u8 V src/MySQLdb/_mysql.c:539:44: 错误:‘MYSQL_OPT_SSL_KEY’未声明(在此函数内第一次使用)/ n# M" c3 r: E+ r
mysql_options(&(self->connection), MYSQL_OPT_SSL_KEY, key);! i) o" A# Y# A
^
, z3 Y5 h; l! d0 P0 ] src/MySQLdb/_mysql.c:539:44: 附注:每个未声明的标识符在其出现的函数内只报告一次
2 p9 h; w' c9 D$ X src/MySQLdb/_mysql.c:540:44: 错误:‘MYSQL_OPT_SSL_CERT’未声明(在此函数内第一次使用)9 T% T7 g& C/ Q0 S/ F- H" ]& G
mysql_options(&(self->connection), MYSQL_OPT_SSL_CERT, cert);8 b S" k9 f% I; ^1 ?! E5 J
^
% r; L% {" h5 ~: t' q src/MySQLdb/_mysql.c:541:44: 错误:‘MYSQL_OPT_SSL_CA’未声明(在此函数内第一次使用)* Q" q: f5 J$ b% a
mysql_options(&(self->connection), MYSQL_OPT_SSL_CA, ca);
" P+ R9 Y7 m" `# f- \. ^0 y, c+ ] ^6 ^0 w, l9 r( J, x
src/MySQLdb/_mysql.c:542:44: 错误:‘MYSQL_OPT_SSL_CAPATH’未声明(在此函数内第一次使用)* P7 X" O: F8 N6 B) l
mysql_options(&(self->connection), MYSQL_OPT_SSL_CAPATH, capath);
. |5 K) J& [" b0 \ w2 j$ p) M& G6 Q ^
# s3 x: y+ E6 b/ _$ T src/MySQLdb/_mysql.c:543:44: 错误:‘MYSQL_OPT_SSL_CIPHER’未声明(在此函数内第一次使用)1 y, k; F' F7 t- E
mysql_options(&(self->connection), MYSQL_OPT_SSL_CIPHER, cipher);
! c0 @8 A* e! v ^3 ]# _7 O8 S8 r! @
src/MySQLdb/_mysql.c:556:13: 警告:隐式声明函数‘mysql_optionsv’ [-Wimplicit-function-declaration]
. ]2 ?) r6 H ], X/ d3 F0 G mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls);; y$ n6 j$ O. C5 l# }2 C
^
' N+ E8 b* }% `; n7 _* o src/MySQLdb/_mysql.c:556:49: 错误:‘MYSQL_OPT_SSL_ENFORCE’未声明(在此函数内第一次使用)
, j4 H% N3 R6 B& T. g# } mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls);7 F8 e5 W, P- R( j a
^5 k. V2 l, M* P7 q) Z
error: command '/usr/bin/gcc' failed with exit code 1
* l- E. j9 ~$ g0 @; q" K [end of output]- t; I( t6 R! A
N4 ~: T S& o* ?, f
note: This error originates from a subprocess, and is likely not a problem with pip.
) w5 ^. x* p4 f8 Q e ERROR: Failed building wheel for mysqlclient
+ j/ ^0 e9 S! @$ jFailed to build mysqlclient
: U+ S2 M/ i* {& bERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (mysqlclient)3 l2 k5 M8 `3 y+ D! y6 D
7 i) w5 N: D, {) c9 l& _
/ @" D/ u5 L6 J' p2 l( G
4 }/ ?, }1 q2 `* O$ A
5 H, T! G9 x& W1 j; }! F$ o7 b n
解决方法:1 m7 j6 W% P; U7 h
! ]7 ?1 S) r: Z' g4 A& y降低mysqlclient 版本,替换mysqlclient-2.0.2 为1:" d6 Q4 i) I8 c
! o' n/ c' f$ I, v3 ?
apache-airflow-providers-mysql==5.4.0: u$ K& k+ U3 E5 {6 V% Z, ?
mysqlclient==2.1.0! `# u, B! b! l. r( b5 W0 D
9 W6 |+ ^ r0 @# ?) w. M) L- G2 _/ P
. L/ f" C% K4 B m3 m) I
9 D0 [$ O# h; m; v |
|