|
|
pip install mysqlclient
+ Q! U" \4 Z1 }/ [% g5 I+ P. kWARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.. R: C! K6 P/ ~5 E, s
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/
: W, g% p" ]0 s7 k: X5 E/ KWARNING: 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/* U1 D" |& G) Q4 z Q; Z ?: _
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/0 j3 ^) g! V! E& e
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/
0 C- E2 ~6 L1 `4 ^/ OWARNING: 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/
- L: T9 x& D0 tCould 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
' c* o2 j% D M, uERROR: Could not find a version that satisfies the requirement mysqlclient (from versions: none)0 N* S0 k* b. n- ~5 N
ERROR: No matching distribution found for mysqlclient
, w* G7 [1 I: W' n4 RWARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
, h% V" b! P5 G2 p( N; z( eCould 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
7 |" G, x1 f7 j& b4 o8 {$ a( s6 t
- E$ J- U8 h/ r y% w1 L5 N3 M x/ Z7 ~
) m/ Q6 L% E) P; L# ~% b* c% S$ T$ A3 Y# p* Y
/ {+ k m( d# {7 I3 H4 E7 F
下载openssl包:: s% q, S1 D+ f+ Q) h J
wget https://openssl.org/source/old/1.1.1/openssl-1.1.1n.tar.gz
: I7 A9 r% { F[url=]openssl-1.1.1n.tar.gz[/url]( V2 O* j- }+ p% g: ~2 D4 g
下载后编译:
; U9 L- r/ r0 k8 f9 Q# tar -zxvf openssl-1.1.1n.tar.gz / x- c3 z; Q' n3 y
( z, [ _ z8 T
# cd openssl-1.1.1n/1 E$ b/ P/ B1 O
# ./Configure --prefix=/usr/local/openssl #设置安装目录 可以自定义 但是要记住,后面会用到, y7 L3 d! y% ^! d+ u* l
4 g/ V8 @. O" D# ./config
: F8 U- L9 u0 H3 f" o: \3 }
4 X" C9 B/ J1 b% d$ H% ]make -j
& Z+ ]: m3 F3 t w; l( b. c: A, j. V1 h' |
8 i: ]0 g7 {3 O; ^" M4 q
[root@python-flask openssl-1.1.1n]# ./Configure --prefix=/usr/local/openssl
: g4 q5 K- i; ]Configuring OpenSSL version 1.1.1n (0x101010efL) for ' H' B7 t6 ?7 `5 n' E
Using os-specific seed configuration2 {8 {1 o4 D& W) h8 O- G) x$ ~1 c) z
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]. A* D7 C. f4 ~; W& i6 P
* Z3 J7 I2 _% p! \pick os/compiler from:; e; _+ u3 z0 r0 d; v& e
BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-riscv64 BSD-sparc64
% ^9 G' ]' B0 j* K% \# rBSD-sparcv8 BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-i386 Cygwin-i486
. I% V4 M2 `, Z; {5 mCygwin-i586 Cygwin-i686 Cygwin-x86 Cygwin-x86_64 DJGPP MPE/iX-gcc UEFI UWIN
8 c. l( k) I$ V) u' g4 cVC-CE VC-WIN32 VC-WIN32-ARM VC-WIN32-ONECORE VC-WIN64-ARM VC-WIN64A
2 E6 v6 }+ o, |VC-WIN64A-ONECORE VC-WIN64A-masm VC-WIN64I aix-cc aix-gcc aix64-cc aix64-gcc / ~3 v) I. _! A- Q( V6 s
android-arm android-arm64 android-armeabi android-mips android-mips64
, f. f0 k( k. a! ?% Qandroid-x86 android-x86_64 android64 android64-aarch64 android64-mips64
& ~1 b, u7 s/ U. _( S1 N$ Aandroid64-x86_64 bsdi-elf-gcc cc darwin-i386-cc darwin-ppc-cc % F) N3 j) i+ a0 i" J o e! l9 \
darwin64-arm64-cc darwin64-ppc-cc darwin64-x86_64-cc gcc haiku-x86 : e' ^/ N; X6 b
haiku-x86_64 hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-gcc 7 C: o9 G7 `. b+ B7 a
hpux-parisc1_1-cc hpux-parisc1_1-gcc hpux64-ia64-cc hpux64-ia64-gcc
1 ^) r p% y7 f# u- ehpux64-parisc2-cc hpux64-parisc2-gcc hurd-x86 ios-cross ios-xcrun ios64-cross . U" t* W/ W6 ?0 Z
ios64-xcrun iossimulator-xcrun iphoneos-cross irix-mips3-cc irix-mips3-gcc
# r" t$ F3 `* F2 | Dirix64-mips4-cc irix64-mips4-gcc linux-aarch64 linux-alpha-gcc linux-aout
5 q( N/ ^" O( P1 j. rlinux-arm64ilp32 linux-armv4 linux-c64xplus linux-elf linux-generic32
- J* H" K4 s tlinux-generic64 linux-ia64 linux-mips32 linux-mips64 linux-ppc linux-ppc64
: J8 Z+ O9 s2 Ilinux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86 linux-x86-clang + R/ r, t$ y8 P# A1 r0 ]4 a& s) X( U
linux-x86_64 linux-x86_64-clang linux32-s390x linux64-mips64 linux64-riscv64
2 a8 p u! a% E Olinux64-s390x linux64-sparcv9 mingw mingw64 nextstep nextstep3.3 sco5-cc 1 W' I' j- k4 U1 ~- h9 L! k
sco5-gcc solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc 7 C- e# K$ h% \
solaris-sparcv8-gcc solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-gcc
: h: g( _3 r# m9 M1 a* zsolaris64-sparcv9-cc solaris64-sparcv9-gcc solaris64-x86_64-cc 2 r S: p8 }+ g. u' Q3 E
solaris64-x86_64-gcc tru64-alpha-cc tru64-alpha-gcc uClinux-dist 5 T M- d8 v6 c
uClinux-dist64 unixware-2.0 unixware-2.1 unixware-7 unixware-7-gcc vms-alpha . F ], q7 ]+ l% t7 [" T# A8 ^, ^4 K4 O
vms-alpha-p32 vms-alpha-p64 vms-ia64 vms-ia64-p32 vms-ia64-p64 vos-gcc ' _9 q. N! ]7 r1 D& G. J' r+ ?+ A
vxworks-mips vxworks-ppc405 vxworks-ppc60x vxworks-ppc750 vxworks-ppc750-debug
! ~5 ^& ^# g9 Pvxworks-ppc860 vxworks-ppcgen vxworks-simlinux 9 i0 R M* |* @7 v( S& ~. W" Y" c
$ f# G8 k. @+ I% f# w- cNOTE: If in doubt, on Unix-ish systems use './config'.8 f* Z2 p S* J
[root@python-flask openssl-1.1.1n]# ./config --prefix=/usr/local/openssl
: m8 M& r+ l4 l/ ]; E# T# C5 gOperating system: x86_64-whatever-linux2) P1 p* K% f# [& M! X
Configuring OpenSSL version 1.1.1n (0x101010efL) for linux-x86_64, T& G2 u5 W9 j4 @$ r2 W" Q2 f: B
Using os-specific seed configuration3 E% y: I' R* X# r$ s0 e
Creating configdata.pm
% h6 U9 I8 F8 |0 d. HCreating Makefile6 K; c" `8 a7 y% ^2 U
7 h [5 r2 ]6 F, w4 q0 J( e2 x**********************************************************************
# W8 I/ @ `' b3 Q9 `*** ***
9 h5 G# f& O) D. D*** OpenSSL has been successfully configured ***7 j: N2 ]1 s) P. T& t
*** ***
5 r! n$ M* @ y6 t3 k( t( l7 [8 V*** If you encounter a problem while building, please open an ***( |6 r* B3 w4 j: I5 A
*** issue on GitHub <https://github.com/openssl/openssl/issues> ***
3 ]% ]7 N5 R+ y, W C; W: @- j*** and include the output from the following command: ***
! {0 }& E. T2 |! o5 L! c+ V*** ***
6 S2 }& ]3 C2 F; c0 a0 v! J*** perl configdata.pm --dump ***0 z# m E2 G$ q& b+ x* V: V0 \
*** ***9 q' Y' C# J8 P8 _1 z# c
*** (If you are new to OpenSSL, you might want to consult the ***9 n5 [- M, y( e
*** 'Troubleshooting' section in the INSTALL file first) ***! p* \5 g0 ]5 `% V) p* {. Y
*** ***
0 |. N- O6 c3 T& d/ h8 K- y**********************************************************************5 N( v# b; G- W( C4 k; y1 b
[root@python-flask openssl-1.1.1n]# make -j& c1 x/ X/ h/ X3 Y- ^3 J
6 e) A# q: I% v" A6 l- T
[root@python-flask openssl-1.1.1n]# make install
1 n% H) k+ c# c# v' ^: B( p* d
" d- F1 l8 Q# Lopenssl安装完成。
1 G! Q% h: ]8 t) I$ q" D
; k5 c" n$ N' k4 o. O: M重新安装python
, l. g7 E' b- v- R+ d3 S/ [2 ]0 u
- _6 x$ J8 |8 h8 D& W# J o* G$ |/ j& J0 W. d' @% D
[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 这个一定别漏
# t5 Q. s4 _1 K
$ q) Y! t0 Q6 D4 F' @* I' y9 o0 Z( F6 ^0 g+ H6 v
4 g7 U6 {, ~. \* E- @
make 或者make -j 都可以 % b, P; ^0 f; \* u7 H2 E
1 v) O' {% y& I& ]; L1 f
然后执行make install
1 z" u7 S3 [; b
6 e; k" P ?/ Y7 ?python 安装完成。
- U- w- z5 x t2 a4 i! k0 f" ^4 [& q" s% C( X
( |1 g# X* M0 U ln -sf /usr/local/python312/bin/python3.12 /usr/bin/python3.12; Z2 |/ L! t5 T* x% ~2 C- Q
8 H+ _5 u& H, E0 C2 K$ X5 v& X' b1 g* B2 q+ {$ b
F. @2 u6 E1 G7 j B
5 c4 h4 j8 K7 d4 w' Z: s3 ^+ Z1 a, @7 I( T
1 W* y* y- r0 j6 F% j
, B& ^, z. `' x% p$ v* M. o
|
|