|
|
pip install mysqlclient' ]9 R& H! q$ v* z9 |# Q( n
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.$ p* K. c; {7 G7 M* C* l4 G R9 J; L9 o
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/
9 U6 n4 u; k# v* Z8 f' i4 NWARNING: 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/* c( D* o5 J6 K0 w$ L) ? d, C
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/
: N' {/ n# j6 L2 qWARNING: 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/. Y6 r+ K D* f) ?. q9 ~- n* V
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/
4 `0 a# B, R# |4 iCould 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
; k) ^ G6 w4 i; ~ERROR: Could not find a version that satisfies the requirement mysqlclient (from versions: none)
9 j4 j# v5 C% s% a1 } ]- pERROR: No matching distribution found for mysqlclient
( n. c {: g! x8 EWARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
2 {& i( d' E0 U1 i( s" ^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
+ `4 @0 d( w; |+ I
0 }5 N* X5 j9 N& t. W
* t4 s+ `' s' M5 @5 @1 ?0 ^ o( ^# l) U' h2 a/ \
+ V8 O! V8 m; d
5 M- U" _8 t3 M2 P, x下载openssl包:
; K7 U3 P$ u# B' w2 h6 e* cwget https://openssl.org/source/old/1.1.1/openssl-1.1.1n.tar.gz" K+ w9 T0 w* Y n* a
[url=]openssl-1.1.1n.tar.gz[/url]
3 k; C! u* ]1 ~5 {下载后编译:
/ l3 P6 A* |$ H- j' w' n6 K# tar -zxvf openssl-1.1.1n.tar.gz 1 W3 |+ b a5 [- k5 g1 x0 `( n
5 i4 y' v9 @" w. E# t3 P# cd openssl-1.1.1n/( e- y+ \. i6 g/ g, u
# ./Configure --prefix=/usr/local/openssl #设置安装目录 可以自定义 但是要记住,后面会用到) `6 p2 X, V1 J; ^/ n& } o
& E- _0 E. s& k
# ./config
$ r( K8 @+ g* h k) ~) ^& z, M; q, C& t4 d* n( d
make -j/ ]2 U1 P Z- d
4 o5 I2 h) }: y$ [& D3 S: l
; q& K( C" [0 t% E9 g2 K* q[root@python-flask openssl-1.1.1n]# ./Configure --prefix=/usr/local/openssl # I3 [8 Y8 Z6 H' w- _$ y
Configuring OpenSSL version 1.1.1n (0x101010efL) for % `7 M- Q" f4 b* O* W: ~. S
Using os-specific seed configuration+ c5 u6 [1 n" \) B' `
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* O4 W Y: S) H
. y4 @3 `0 g' f9 vpick os/compiler from:3 X- ]0 p0 e! k4 H
BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-riscv64 BSD-sparc64
' N+ q9 X$ q |BSD-sparcv8 BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-i386 Cygwin-i486
% Y6 @/ d, s8 o$ M9 F; SCygwin-i586 Cygwin-i686 Cygwin-x86 Cygwin-x86_64 DJGPP MPE/iX-gcc UEFI UWIN 4 q4 U4 A8 i; b% H# M0 ]
VC-CE VC-WIN32 VC-WIN32-ARM VC-WIN32-ONECORE VC-WIN64-ARM VC-WIN64A . z, p% [1 F. Y. S% O# {
VC-WIN64A-ONECORE VC-WIN64A-masm VC-WIN64I aix-cc aix-gcc aix64-cc aix64-gcc 8 N$ [$ W) N( O# G
android-arm android-arm64 android-armeabi android-mips android-mips64
5 m3 @+ X# q- [- u( b5 _2 ]; }android-x86 android-x86_64 android64 android64-aarch64 android64-mips64
" `5 M- e( A# e. [5 g \) iandroid64-x86_64 bsdi-elf-gcc cc darwin-i386-cc darwin-ppc-cc 2 L( ]- T; `% K4 H
darwin64-arm64-cc darwin64-ppc-cc darwin64-x86_64-cc gcc haiku-x86 $ u' l, l3 H S! n1 m5 K
haiku-x86_64 hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-gcc
- v8 i; s" M+ W: zhpux-parisc1_1-cc hpux-parisc1_1-gcc hpux64-ia64-cc hpux64-ia64-gcc 4 R7 A2 O8 w: {0 W
hpux64-parisc2-cc hpux64-parisc2-gcc hurd-x86 ios-cross ios-xcrun ios64-cross
. X6 P5 \1 [# u3 R2 `. B- x- bios64-xcrun iossimulator-xcrun iphoneos-cross irix-mips3-cc irix-mips3-gcc 4 y0 r9 T I# F0 Y
irix64-mips4-cc irix64-mips4-gcc linux-aarch64 linux-alpha-gcc linux-aout ; ], j7 O& }& |& e# c2 }
linux-arm64ilp32 linux-armv4 linux-c64xplus linux-elf linux-generic32
1 q: ]7 T0 }; A% f4 h1 Glinux-generic64 linux-ia64 linux-mips32 linux-mips64 linux-ppc linux-ppc64
! u/ p. _* ?: `linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86 linux-x86-clang
9 ~0 p8 F8 U) u1 }linux-x86_64 linux-x86_64-clang linux32-s390x linux64-mips64 linux64-riscv64
7 k: [: c4 V/ s+ T3 S8 |. xlinux64-s390x linux64-sparcv9 mingw mingw64 nextstep nextstep3.3 sco5-cc $ @8 [# b. f% A6 D
sco5-gcc solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc
5 a/ L- j, i1 y: j7 F. `/ _: ysolaris-sparcv8-gcc solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-gcc
+ i9 P! u$ n* F5 r# X' gsolaris64-sparcv9-cc solaris64-sparcv9-gcc solaris64-x86_64-cc - \5 L, a' A- [
solaris64-x86_64-gcc tru64-alpha-cc tru64-alpha-gcc uClinux-dist
1 D( E5 h/ M1 q8 XuClinux-dist64 unixware-2.0 unixware-2.1 unixware-7 unixware-7-gcc vms-alpha ' f# @0 U7 ^$ k/ Q: a
vms-alpha-p32 vms-alpha-p64 vms-ia64 vms-ia64-p32 vms-ia64-p64 vos-gcc s$ \: ]; s2 J' o
vxworks-mips vxworks-ppc405 vxworks-ppc60x vxworks-ppc750 vxworks-ppc750-debug
* c; G# Y: ` o. e/ J+ U6 c/ i4 D% Mvxworks-ppc860 vxworks-ppcgen vxworks-simlinux ' _- S: ]; f' p( _8 Q
5 {- C* o# e$ _/ f: |* j7 y
NOTE: If in doubt, on Unix-ish systems use './config'.
" [% D. J h" D' u6 b3 C7 Z[root@python-flask openssl-1.1.1n]# ./config --prefix=/usr/local/openssl 7 E. F! k$ `0 Q) E( K- r" E
Operating system: x86_64-whatever-linux2
7 Y! m( C5 {6 K5 tConfiguring OpenSSL version 1.1.1n (0x101010efL) for linux-x86_64
3 K6 S5 l: r2 P) QUsing os-specific seed configuration
: _, H( z9 g6 I, i$ i3 [* UCreating configdata.pm
+ ~$ H6 b+ \$ h+ |' ~& b: B. ICreating Makefile Q' {( Z! V5 H- t% g
* |; {$ B0 c. R+ ?9 h: _
**********************************************************************0 P7 O; a6 N q b( F: U8 a" g* F
*** ***
2 E/ F4 S% D/ J8 d8 `% _*** OpenSSL has been successfully configured ***1 a K8 h% e5 U# {% @$ F
*** ***: O8 j, _/ M$ h* k8 {0 E4 Q
*** If you encounter a problem while building, please open an ***
/ b! P W2 i- h3 n' s- G# ]*** issue on GitHub <https://github.com/openssl/openssl/issues> ***& C; g; {0 v9 u8 u/ k5 i
*** and include the output from the following command: ***) N% }* B+ u* R8 D3 ^" J
*** ***
+ q% F* M. T" _2 X, k+ \7 v*** perl configdata.pm --dump **** n; o1 W% u8 b, ?+ c: s0 {2 P$ R
*** ***& L; K. Q9 E |4 R$ X
*** (If you are new to OpenSSL, you might want to consult the ***
3 h* r1 P# B/ X- Y*** 'Troubleshooting' section in the INSTALL file first) ***
$ X% L/ r/ S0 `5 X; k: E, }*** ***' V* A, g# N- R8 a
**********************************************************************
+ \- e$ y- w& n4 `- m ~" K[root@python-flask openssl-1.1.1n]# make -j; g$ q7 V* q+ a
) Q9 C; t, K: X/ d9 o
[root@python-flask openssl-1.1.1n]# make install
; g7 f; n* X' e* a2 e; n3 q2 q* O; O$ W
openssl安装完成。. p/ o* m' d* e9 M( z& Y
8 p1 O& F x2 G( k8 s% H
重新安装python
) R$ T7 W5 P5 {* Y7 N( R( E/ q# m% K6 D/ Q6 ]$ e
, |0 X; N1 @ B/ m
[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 这个一定别漏
4 d$ p- ?: e( i) J5 Z9 D% W+ |' k( s$ v5 c
, I9 Y% `6 X3 S% s4 }
2 S4 q! L+ k# Q, \make 或者make -j 都可以 ) F& z' n; m/ q I/ S' O7 j, f
4 S; r5 e% B& P1 e5 U然后执行make install * [# a( g5 o! k, F1 Q; n
8 m* {% D9 P( D% L* O3 V
python 安装完成。
5 l- D8 C6 c6 H
& j1 ^+ ~* i. n8 \5 D
3 r D0 Z1 p7 m7 Z7 N: L( J+ H+ i ln -sf /usr/local/python312/bin/python3.12 /usr/bin/python3.12 q7 Y& T, y( g
( A) H$ X9 q1 x. n! }9 Z- o o" h* P- k
! j* ^( h7 S/ z: Z, q; r2 y
8 J" U1 X4 _- n6 V. b
1 D8 V% B! {2 E6 _: }9 y+ i' Z4 s' l
: S2 h% q6 q) Z
, }9 K1 [/ @% W( o" J+ n! ` |
|