|
|
pip install mysqlclient: a" m% f, v$ Y. {, n
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.6 C z9 O: b" q3 H, ]/ }1 I/ {
WARNING: 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/
! L# |, F8 }/ n$ ^7 U% }$ JWARNING: 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/9 e* x' O& @# m$ [8 |9 }6 }
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/: b3 y( R: @, q# a7 y
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/
# S" V6 A6 g0 E1 e% aWARNING: 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/. c o9 M! V: q! `) ]' l
Could 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.")) - skipping7 M4 X. S0 K4 ~3 m8 B8 R6 q
ERROR: Could not find a version that satisfies the requirement mysqlclient (from versions: none)# O; X1 {. Y. C; L& e1 b9 f4 r X
ERROR: No matching distribution found for mysqlclient1 H3 R, G! P3 s, |# l8 \
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
2 i1 }2 n) s- o+ O2 F5 k: E' A4 |Could 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# \1 d: r8 [; J2 @6 V
* e: Z) r4 J6 i: U* X8 h2 `$ V
; @- F' [2 B0 L8 ~1 }' q, z* r4 y0 E, E4 e# l
& { S0 F) J7 J7 K: _" s
/ d2 E2 T& b' J
下载openssl包:
6 u3 R" B, |3 d/ t# u, nwget https://openssl.org/source/old/1.1.1/openssl-1.1.1n.tar.gz( ?& i3 R0 K% B M8 J
[url=]openssl-1.1.1n.tar.gz[/url]
% W; q0 T2 v6 j7 y( e3 j下载后编译:: O1 s( z! r+ T7 q
# tar -zxvf openssl-1.1.1n.tar.gz
8 P) L" `, [8 [( q# ]! d" I
1 K9 n+ `$ Q; Z% H# cd openssl-1.1.1n/
O+ W% k6 i% T1 `# ./Configure --prefix=/usr/local/openssl #设置安装目录 可以自定义 但是要记住,后面会用到
' H/ d# l! F1 H! s- Z6 b# J
7 R" V9 Z! n/ r) p# ./config3 |$ f5 x, E) |7 U- I
$ k C2 x. W. E2 V9 s
make -j
: `/ }/ d/ @, W* E) q
! A4 U* ^2 A/ V, ]: u; X
3 a0 W- U- u% T9 L2 r[root@python-flask openssl-1.1.1n]# ./Configure --prefix=/usr/local/openssl " v3 I9 C, F. _9 e' R* t. w
Configuring OpenSSL version 1.1.1n (0x101010efL) for
* Z+ x$ F I, Q( ]Using os-specific seed configuration/ s" a* ?8 R% V
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], R$ S. j6 d5 b4 ]4 Q9 |
. D& e0 H, W; J; s. Opick os/compiler from:
- ?# I; [3 M. \$ qBS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-riscv64 BSD-sparc64 # M, q/ m: C4 Q7 W! _8 [! W) E
BSD-sparcv8 BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-i386 Cygwin-i486
; k7 g) z) K4 ~) i; bCygwin-i586 Cygwin-i686 Cygwin-x86 Cygwin-x86_64 DJGPP MPE/iX-gcc UEFI UWIN 5 ^' ?% l$ Y) e( h
VC-CE VC-WIN32 VC-WIN32-ARM VC-WIN32-ONECORE VC-WIN64-ARM VC-WIN64A
8 d6 e+ d! e( p% t- ^: OVC-WIN64A-ONECORE VC-WIN64A-masm VC-WIN64I aix-cc aix-gcc aix64-cc aix64-gcc
7 \8 ?2 }9 w7 `) mandroid-arm android-arm64 android-armeabi android-mips android-mips64 & I, y4 Y$ j) x: t- y% r
android-x86 android-x86_64 android64 android64-aarch64 android64-mips64 / Q' X6 r" Y9 x+ {8 k0 R
android64-x86_64 bsdi-elf-gcc cc darwin-i386-cc darwin-ppc-cc ( H& J2 r: O' n
darwin64-arm64-cc darwin64-ppc-cc darwin64-x86_64-cc gcc haiku-x86 . V2 [& q8 \, o4 ^5 X( ?
haiku-x86_64 hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-gcc
& u8 u+ O; B7 P2 _! {' C1 Q! Vhpux-parisc1_1-cc hpux-parisc1_1-gcc hpux64-ia64-cc hpux64-ia64-gcc
* v+ F* X# U3 |. Z, mhpux64-parisc2-cc hpux64-parisc2-gcc hurd-x86 ios-cross ios-xcrun ios64-cross
1 q* [* Z g; ^ios64-xcrun iossimulator-xcrun iphoneos-cross irix-mips3-cc irix-mips3-gcc / |: k1 ]( P$ x1 f7 n3 A, V
irix64-mips4-cc irix64-mips4-gcc linux-aarch64 linux-alpha-gcc linux-aout
( G) K$ o5 S' H; H2 O% |linux-arm64ilp32 linux-armv4 linux-c64xplus linux-elf linux-generic32
4 y* h, [' x, R! k& P) c, E5 elinux-generic64 linux-ia64 linux-mips32 linux-mips64 linux-ppc linux-ppc64 7 W9 s" l' q& I' c8 |, c
linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86 linux-x86-clang
( _: c* j6 h# O4 Z' T) p( X1 R. rlinux-x86_64 linux-x86_64-clang linux32-s390x linux64-mips64 linux64-riscv64 , O8 B, ~2 g" Y! Y% V# `" h- M! ]0 s
linux64-s390x linux64-sparcv9 mingw mingw64 nextstep nextstep3.3 sco5-cc
: d2 h* Z( e& w5 R2 h: T+ H1 Fsco5-gcc solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc
' N' |) ?- R5 I* \solaris-sparcv8-gcc solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-gcc ) N% h# [, k) J1 o) U) ~
solaris64-sparcv9-cc solaris64-sparcv9-gcc solaris64-x86_64-cc % Z; m" K5 k: }
solaris64-x86_64-gcc tru64-alpha-cc tru64-alpha-gcc uClinux-dist
2 C6 q$ ~2 r' f! u* D$ G0 J0 fuClinux-dist64 unixware-2.0 unixware-2.1 unixware-7 unixware-7-gcc vms-alpha . n1 V7 X9 Y5 L& {* a+ Q
vms-alpha-p32 vms-alpha-p64 vms-ia64 vms-ia64-p32 vms-ia64-p64 vos-gcc
" c7 N( K9 q& z9 e2 o1 L0 `vxworks-mips vxworks-ppc405 vxworks-ppc60x vxworks-ppc750 vxworks-ppc750-debug
; a5 H) C2 b: }/ Q/ Zvxworks-ppc860 vxworks-ppcgen vxworks-simlinux
' W5 ~' T! Z; J% a' o$ @
. S" u% K u( m( ]7 G/ J! dNOTE: If in doubt, on Unix-ish systems use './config'.9 k/ K* Z6 f5 T& h- g+ w0 f; \
[root@python-flask openssl-1.1.1n]# ./config --prefix=/usr/local/openssl
0 L( G& N/ M: w# _: l+ _; kOperating system: x86_64-whatever-linux2
6 S# B @' ~- X5 c% ] YConfiguring OpenSSL version 1.1.1n (0x101010efL) for linux-x86_64
' c1 N3 F# t$ n( i% b/ rUsing os-specific seed configuration
4 e3 L( z, G- q& I8 t* {Creating configdata.pm
" h" x0 u3 W6 UCreating Makefile
* r3 W! }0 w) K) x
1 o1 r3 F5 @, N% f/ ] ?**********************************************************************
* @/ s( m" R1 z*** ***
- h7 d) n k; I* A( L' n*** OpenSSL has been successfully configured ***
5 a; c5 h1 @3 [; o% S4 {" f*** ***2 K$ A9 b9 j7 X9 y6 a: F( O/ }# a
*** If you encounter a problem while building, please open an ***; o1 y0 T* [" F
*** issue on GitHub <https://github.com/openssl/openssl/issues> ***$ D5 c% j5 D* D" R6 D$ o
*** and include the output from the following command: ***/ ]; n) W4 f- e4 Q6 e1 A& |& C
*** ***
9 { Q6 `- a7 ?* ^/ Y*** perl configdata.pm --dump ***
5 v: Z4 l$ T# m) S& \*** ***. c0 `0 ]1 U3 f- @
*** (If you are new to OpenSSL, you might want to consult the ***1 c/ ?+ Q! `6 S7 ^& G3 S, i
*** 'Troubleshooting' section in the INSTALL file first) ***) V" Q; W; Y+ \9 m9 X% _
*** ***9 Z: i- w3 g" q: V: {. `: Y
**********************************************************************
' D9 L8 N! |2 }% U3 x[root@python-flask openssl-1.1.1n]# make -j
+ ?; @) H$ o! `1 E% a" D6 a
" J' c- V! d$ ]+ J0 i l P [root@python-flask openssl-1.1.1n]# make install
8 H+ z0 f1 _% t6 |, u! P" z- s
9 A: ~" a' b" X/ R2 O; H Hopenssl安装完成。
0 A0 h3 r i6 t6 k! S& W, s: i V- x. N7 q
重新安装python4 W- R" c: E+ z, W( _
$ z4 u4 c. B( f/ {
+ D8 p1 K$ ?& p[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 这个一定别漏, U8 K: q% u% @$ }2 `
. _: p! u T/ F! B+ k- U$ l$ W6 `+ Z, O4 K
/ A& s0 n1 X( j2 J( d+ p
make 或者make -j 都可以 2 t2 v; O! v5 w
/ r K% E5 Q% L
然后执行make install & Z# r4 X- B) c5 `; n# z
% o0 z7 e7 b" u' R! P3 O
python 安装完成。
1 z& Z, G8 K0 K# v s% Y9 w/ t) `* q- t- z$ _: I8 P$ L
$ I4 z8 Z5 N- J6 y
ln -sf /usr/local/python312/bin/python3.12 /usr/bin/python3.12
# Q4 ?2 R, G; A" A; F0 o$ W* q1 u0 ?- e! c
+ }9 u- L( W- T6 r" j
) S3 |$ p/ m0 b
7 W } M3 l$ w4 [7 ?) n; D7 a7 l1 M* l5 b* P
, m. m1 w- u2 Y7 @- }/ ~) G5 C7 z8 L3 V* x+ F& p
|
|