- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
pip install mysqlclient
# L' D' L. A) m( i0 f H8 bWARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
: q4 @0 z. J( Y, AWARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/mysqlclient/
. \4 d/ o$ w* b. {1 SWARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/mysqlclient/6 w0 @9 I) N3 v
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/mysqlclient/6 J2 z; s( z1 W
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/mysqlclient/5 N7 K7 ?7 g' M
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/mysqlclient/
* V2 `9 X' ?3 A# N% h; Q; _7 uCould not fetch URL https://pypi.org/simple/mysqlclient/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/mysqlclient/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping* S* ?9 j2 O# o% g
ERROR: Could not find a version that satisfies the requirement mysqlclient (from versions: none)4 z h' U- i' p j
ERROR: No matching distribution found for mysqlclient4 k# M. d! C8 M
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
+ V$ @; U2 F. ~; q' r" tCould not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping: m+ g: p4 v; h3 M$ {+ K
8 Q/ z/ G2 K! ~1 q. g H5 b
' d2 `- {' y8 e: v" ]( r8 e, [5 V/ P! e: ?2 @% |
, M) \+ V9 @. a3 y. W( B. f
8 ]: R* i( Q) u' @' B) s7 L& _下载openssl包:9 b( t4 p% h9 Z# M8 L' n* G) ]
wget https://openssl.org/source/old/1.1.1/openssl-1.1.1n.tar.gz. I; |7 z, _ j @0 D+ n
[url=]openssl-1.1.1n.tar.gz[/url]" h6 f! H e+ W
下载后编译:! N( }4 x+ e+ v2 l
# tar -zxvf openssl-1.1.1n.tar.gz - s/ Q0 F- p7 n0 R' Q3 H X
0 S; V. F( p5 ^% ~7 m4 [1 W/ g
# cd openssl-1.1.1n/
9 a) w# r: A1 N1 t# ./Configure --prefix=/usr/local/openssl #[color=rgba(0, 0, 0, 0.75)]设置安装目录 可以自定义 但是要记住,后面会用到
& y- c8 L6 T; {; C2 W0 Y; V0 ]8 z# }# k u5 w
# ./config. T |7 V ^1 I& M: e+ s6 ~2 q
: q( R9 x4 v8 }% x# K
make -j
9 m% t1 n% z' ~: |# P
/ H% y* I$ \% l
$ }; V! b- u* Z& E[root@python-flask openssl-1.1.1n]# ./Configure --prefix=/usr/local/openssl
1 x4 \" b0 `9 p% X/ S9 ^ t, bConfiguring OpenSSL version 1.1.1n (0x101010efL) for ; q" O" y& Y8 T
Using os-specific seed configuration3 _1 y8 I. `, f, M. [
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]
3 G) L. M2 I- a9 Y0 T8 v% Z
3 u0 B0 l8 ^5 Apick os/compiler from:
$ A, ]- i; f, F& RBS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-riscv64 BSD-sparc64 9 h1 U5 I' t( P
BSD-sparcv8 BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-i386 Cygwin-i486 + D- M) x3 u, f0 {6 J& V2 `
Cygwin-i586 Cygwin-i686 Cygwin-x86 Cygwin-x86_64 DJGPP MPE/iX-gcc UEFI UWIN R: S1 ] [4 a2 _9 a
VC-CE VC-WIN32 VC-WIN32-ARM VC-WIN32-ONECORE VC-WIN64-ARM VC-WIN64A
: z/ e/ h Q/ WVC-WIN64A-ONECORE VC-WIN64A-masm VC-WIN64I aix-cc aix-gcc aix64-cc aix64-gcc ' M/ R, k7 I* W/ `! C: Y2 s; e
android-arm android-arm64 android-armeabi android-mips android-mips64
5 b; ]+ X# A' eandroid-x86 android-x86_64 android64 android64-aarch64 android64-mips64 % v5 \" b' A) E2 ?; ?8 { I! Y
android64-x86_64 bsdi-elf-gcc cc darwin-i386-cc darwin-ppc-cc
" n2 T4 n- m! D! v( D9 Tdarwin64-arm64-cc darwin64-ppc-cc darwin64-x86_64-cc gcc haiku-x86 ( `2 \, f" l. u" M0 s
haiku-x86_64 hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-gcc
$ P# H, e: h1 |0 ?! \ s5 mhpux-parisc1_1-cc hpux-parisc1_1-gcc hpux64-ia64-cc hpux64-ia64-gcc
+ ?! H3 e& d1 O. }# A% Q8 \& phpux64-parisc2-cc hpux64-parisc2-gcc hurd-x86 ios-cross ios-xcrun ios64-cross # Z+ _9 e9 S7 j; ?8 {# S! r
ios64-xcrun iossimulator-xcrun iphoneos-cross irix-mips3-cc irix-mips3-gcc 3 b0 F$ n' x7 N+ V/ [
irix64-mips4-cc irix64-mips4-gcc linux-aarch64 linux-alpha-gcc linux-aout
/ g8 ]5 x5 w; o) s2 Klinux-arm64ilp32 linux-armv4 linux-c64xplus linux-elf linux-generic32
5 w+ g5 R" |% Vlinux-generic64 linux-ia64 linux-mips32 linux-mips64 linux-ppc linux-ppc64 * \& U4 v) r. @$ u) z( y
linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86 linux-x86-clang 9 }3 J7 f( a3 j7 V" X# V
linux-x86_64 linux-x86_64-clang linux32-s390x linux64-mips64 linux64-riscv64 ; c. Y2 u/ R) T. z0 d! O/ q/ {4 U" T
linux64-s390x linux64-sparcv9 mingw mingw64 nextstep nextstep3.3 sco5-cc
# R R6 E9 b* ^/ q! V wsco5-gcc solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc * f. [8 U$ a, O5 v8 Q: R
solaris-sparcv8-gcc solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-gcc
! x9 O$ F( |% d. ?% c8 wsolaris64-sparcv9-cc solaris64-sparcv9-gcc solaris64-x86_64-cc 2 n, a9 e! S& `; I
solaris64-x86_64-gcc tru64-alpha-cc tru64-alpha-gcc uClinux-dist 5 N! q) f) c/ j; A& d+ A
uClinux-dist64 unixware-2.0 unixware-2.1 unixware-7 unixware-7-gcc vms-alpha ( E) O. ]5 P+ x/ n, z1 b
vms-alpha-p32 vms-alpha-p64 vms-ia64 vms-ia64-p32 vms-ia64-p64 vos-gcc 0 f8 L5 M' Z8 ?, u4 a5 @. m
vxworks-mips vxworks-ppc405 vxworks-ppc60x vxworks-ppc750 vxworks-ppc750-debug 0 r/ e) K: I ^$ Z [9 V" Z
vxworks-ppc860 vxworks-ppcgen vxworks-simlinux 7 F& t! J# @% v1 E( A! {
2 a9 J4 r$ K1 n& B3 _4 r/ jNOTE: If in doubt, on Unix-ish systems use './config'.2 T3 K- y7 r& D7 t
[root@python-flask openssl-1.1.1n]# ./config --prefix=/usr/local/openssl 6 D4 u8 z: M/ y; @; O
Operating system: x86_64-whatever-linux2" ~; ~6 ^4 M- Q V& K! o6 I5 G
Configuring OpenSSL version 1.1.1n (0x101010efL) for linux-x86_64
, Q! R1 V4 u* |Using os-specific seed configuration4 N+ J" f, a6 c$ F
Creating configdata.pm" I3 t6 ~" J3 G: U$ W1 `9 @+ t; k- w, ^
Creating Makefile
( k. w) h3 o5 y6 g+ I* j% G7 r- M0 K' W+ Q& J* t$ n
**********************************************************************' q% g* ]6 a9 p
*** ***
. J) \3 w) T6 _$ _& Q# Q8 J8 a0 b*** OpenSSL has been successfully configured ***- q+ @- A% o7 S6 H
*** ***
6 t6 ? k& l2 o% _; q6 H- H# B*** If you encounter a problem while building, please open an ***! A) E* a: u6 Q
*** issue on GitHub <https://github.com/openssl/openssl/issues> ***. }' R; e0 F5 u+ E" W
*** and include the output from the following command: ***
" I% X; E2 v' h7 l* e+ R*** ***
( H6 N r$ e) g8 l6 M. C7 ]1 g*** perl configdata.pm --dump ***8 g, d& r7 ^1 v5 r
*** ***
" q/ J- D8 H* n, r% W, n) p6 e*** (If you are new to OpenSSL, you might want to consult the ***' P* f/ K- L, l s1 V
*** 'Troubleshooting' section in the INSTALL file first) ***2 }3 W* ?+ ^ F. x8 V3 F
*** ***4 B# O# \! l5 T8 D" [- d
**********************************************************************0 }7 P" @2 _/ `; C* z6 w
[root@python-flask openssl-1.1.1n]# make -j
O$ c8 b# w5 F; K/ @# F: x ; n: Q7 c- Z! t+ A9 a0 C+ `9 D
[root@python-flask openssl-1.1.1n]# make install
6 I1 `; F4 R) t5 n z: C
; @3 y& ]$ t8 a0 S" K" D6 copenssl安装完成。: i$ V$ b9 ^% ?* h& ]
2 c2 S& s3 e" [6 P7 L6 e
重新安装python
" o2 z3 n( j- h5 v6 E" {6 v
7 J. V6 K; j8 U+ d) Q8 j4 ^0 g' ^6 K3 u# m6 z9 _; G1 s
[root@python-flask Python-3.12.4]# ./configure --prefix=/usr/local/python312 --enable-optimizations --with-openssl=/usr/local/openssl --with-openssl-rpath=auto 添加openssl 相关参数,--with-openssl-rpath=auto [color=rgba(0, 0, 0, 0.75)]这个一定别漏
. s, b. N: P$ H2 z% f# Q' h: y' L
2 L. E4 |# F& z' p" v8 K0 w) t; `( y; E; W, w) i7 ]
% I2 U# F3 S% k2 D- U8 O
make 或者make -j 都可以
) j+ T: h- d3 Z* @) |" q% v, W# g4 t9 ?. c, Q$ C- y, r3 F: K
然后执行make install 2 w+ h/ ]; q, v O% S$ H1 Y0 f- s
; j' o# n: u6 a! K* y
python 安装完成。
2 I1 r0 \+ Q0 {. i7 E
% T4 U) q- O/ s1 p0 q
' e' z& r, W) L5 g) l1 P ln -sf /usr/local/python312/bin/python3.12 /usr/bin/python3.129 |& X/ Q- h5 B- ~
8 W i! B( M3 b0 X- Z0 f/ H& ~( c! |% D0 K5 w2 ~6 c# A
( c( h5 P0 D, G) j- ?1 N2 P4 _
/ v z& u8 J! z) c( V1 y
( N3 r& M& a+ c
+ P N" }6 X8 C, \: W7 t
" j0 v; G7 N: a5 w2 z
|
|