|
|
pip install mysqlclient/ y9 u! N) _7 E7 m
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.5 k: _4 D& a6 g
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/, O8 Q! X, R3 n
WARNING: 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// u9 }- K" x' f: m6 s
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/
, T0 Y f* ?. g0 @6 }2 VWARNING: 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/: ^, a% {6 } l5 F9 _
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/# D( M+ i) T9 f: Q" w+ x) e5 `' \
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.")) - skipping
7 h8 k( }; F% C: ?: B$ y3 f* LERROR: Could not find a version that satisfies the requirement mysqlclient (from versions: none)4 X9 s, ~9 _% C& q# h& }7 o
ERROR: No matching distribution found for mysqlclient1 g+ ]* {. H7 P
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
: A# |: z, q2 z ?3 vCould 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
/ |8 B8 e9 r- E% [" H, |
1 Z$ H3 @! M7 O" W: B7 R" p0 L) }( r8 P/ e+ a
" `+ O: j& h/ g. _9 s* j+ a5 L
/ `0 s+ S ]9 C+ B% |: [/ t0 i0 h% m$ y& _
下载openssl包:
4 F/ e& ?" P' R& Ywget https://openssl.org/source/old/1.1.1/openssl-1.1.1n.tar.gz$ a3 X* @. p6 f8 ?" d! C
[url=]openssl-1.1.1n.tar.gz[/url]
+ V! X: A2 _8 b1 y4 @; C下载后编译:
; }, u( A4 b+ H. j- N( j, A# tar -zxvf openssl-1.1.1n.tar.gz $ f2 M6 O% j. J
; r* B* e7 j! u! B
# cd openssl-1.1.1n/- u3 T( a4 J( r
# ./Configure --prefix=/usr/local/openssl #设置安装目录 可以自定义 但是要记住,后面会用到, I8 b c. }% j' D5 W; r; Q
+ C' `! ?& C8 C) ]( l9 y4 U* w6 j# ./config
$ y: L0 |( w0 y# Z7 T! L2 f6 T0 h' a( R
make -j. M% V6 b2 O$ p5 D% |' i* N
) E- p0 _# V, _* P- p" j7 c
( d, ^0 s0 T5 R. ?; u[root@python-flask openssl-1.1.1n]# ./Configure --prefix=/usr/local/openssl 6 L+ A4 g# p! a. }8 T0 D
Configuring OpenSSL version 1.1.1n (0x101010efL) for * `& V4 Q( H; S
Using os-specific seed configuration
& | O5 X+ c% s9 F, W: e0 ?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]0 h1 b0 x* V0 o$ q8 O! ]
5 N+ a$ @/ M) v6 w4 f" L
pick os/compiler from:/ m. q! j. [% \5 k0 K+ p
BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-riscv64 BSD-sparc64 " N0 D, R( _3 d; H
BSD-sparcv8 BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-i386 Cygwin-i486 ( \; y5 z1 N( a! N5 u( y( z
Cygwin-i586 Cygwin-i686 Cygwin-x86 Cygwin-x86_64 DJGPP MPE/iX-gcc UEFI UWIN
$ Z0 M* y( S7 e4 uVC-CE VC-WIN32 VC-WIN32-ARM VC-WIN32-ONECORE VC-WIN64-ARM VC-WIN64A
) \8 G5 u8 h# M1 f: {9 tVC-WIN64A-ONECORE VC-WIN64A-masm VC-WIN64I aix-cc aix-gcc aix64-cc aix64-gcc ' U. U6 k9 k8 r% T7 u" b9 n
android-arm android-arm64 android-armeabi android-mips android-mips64 - M& R9 T. y% b/ P! s$ X
android-x86 android-x86_64 android64 android64-aarch64 android64-mips64 X$ S$ U6 R" |3 S7 f
android64-x86_64 bsdi-elf-gcc cc darwin-i386-cc darwin-ppc-cc
0 _5 y, t# H5 Z1 g: adarwin64-arm64-cc darwin64-ppc-cc darwin64-x86_64-cc gcc haiku-x86 ( Z" z' ?* G9 ~$ ^+ O
haiku-x86_64 hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-gcc
, Z7 ?5 P. o% I- h2 t$ dhpux-parisc1_1-cc hpux-parisc1_1-gcc hpux64-ia64-cc hpux64-ia64-gcc
8 v) w- E$ m* [hpux64-parisc2-cc hpux64-parisc2-gcc hurd-x86 ios-cross ios-xcrun ios64-cross ) d6 U0 ~! o4 G) E1 O! V. v6 g! i9 u; p
ios64-xcrun iossimulator-xcrun iphoneos-cross irix-mips3-cc irix-mips3-gcc ( [7 }- K6 \( j& C, g8 w
irix64-mips4-cc irix64-mips4-gcc linux-aarch64 linux-alpha-gcc linux-aout
0 Z; N& l6 v6 F4 D" A- \linux-arm64ilp32 linux-armv4 linux-c64xplus linux-elf linux-generic32 3 m- m& u, o( _" }
linux-generic64 linux-ia64 linux-mips32 linux-mips64 linux-ppc linux-ppc64
4 X* }, _3 d; a6 @+ K$ @ G1 {/ h% Klinux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86 linux-x86-clang 5 W6 }4 n! Y% x
linux-x86_64 linux-x86_64-clang linux32-s390x linux64-mips64 linux64-riscv64
- G4 x C$ b8 wlinux64-s390x linux64-sparcv9 mingw mingw64 nextstep nextstep3.3 sco5-cc + L8 b$ e( ~+ e6 X7 y
sco5-gcc solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc
6 S0 ^4 e# O& Csolaris-sparcv8-gcc solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-gcc
, E/ ?5 w; E" X+ l2 \solaris64-sparcv9-cc solaris64-sparcv9-gcc solaris64-x86_64-cc ' t1 ^! T) H: s" i6 K. i7 q' f
solaris64-x86_64-gcc tru64-alpha-cc tru64-alpha-gcc uClinux-dist
: {- m3 U; s8 N& B7 S6 r9 N3 JuClinux-dist64 unixware-2.0 unixware-2.1 unixware-7 unixware-7-gcc vms-alpha " g0 j. K4 U! ~6 A5 Y. S
vms-alpha-p32 vms-alpha-p64 vms-ia64 vms-ia64-p32 vms-ia64-p64 vos-gcc 0 ]% b( c) a' v; [, Y& M; `
vxworks-mips vxworks-ppc405 vxworks-ppc60x vxworks-ppc750 vxworks-ppc750-debug $ h* ]6 k" H9 {6 b2 p
vxworks-ppc860 vxworks-ppcgen vxworks-simlinux
6 @4 V" l9 m# P9 n" c% G! r
6 Z: ^, k, K, j! m/ v4 mNOTE: If in doubt, on Unix-ish systems use './config'.% j4 r4 ^ T' c
[root@python-flask openssl-1.1.1n]# ./config --prefix=/usr/local/openssl ' Y8 l+ ~+ d2 h5 p7 @3 e6 ]
Operating system: x86_64-whatever-linux2
3 G/ W4 ?, } gConfiguring OpenSSL version 1.1.1n (0x101010efL) for linux-x86_64
" J* _! _- C0 B, f. o& \$ WUsing os-specific seed configuration T! L: e( d- K4 S8 G! d* @
Creating configdata.pm8 E3 \" R. P5 o) } m( w. k) e
Creating Makefile
- H$ f' b! @2 z- A' q$ I
7 @" {$ _3 n0 C- F********************************************************************** t! G7 _% S( D
*** ***# F6 D: P! S8 W: v% G0 n T+ U- n
*** OpenSSL has been successfully configured ***$ B3 s s! C) I2 U: c+ c I; b
*** ***8 l4 z/ H7 a C- E" C
*** If you encounter a problem while building, please open an ***
" i- W# `; e# C4 @*** issue on GitHub <https://github.com/openssl/openssl/issues> ***; t5 s7 N+ J/ t! K" P2 y1 N+ D6 Z
*** and include the output from the following command: ***
7 i {- e8 l% J: H% ?+ f4 W*** ***3 X+ q' l- } Q3 ]! j0 i; h1 B. j
*** perl configdata.pm --dump ***
+ u4 y; M8 i3 i/ ~5 e z6 {*** ***
: Z! N* W0 V' G; [ ~$ K6 y*** (If you are new to OpenSSL, you might want to consult the ***
' ]0 F" D1 G7 D: q4 G# S& C*** 'Troubleshooting' section in the INSTALL file first) ***: t9 d1 a& H' [7 n
*** ***1 ?$ f) Q* D: b( @/ w
**********************************************************************
; e p; ], T; a* A. @[root@python-flask openssl-1.1.1n]# make -j0 R' v$ C. B a2 \
- ?8 k0 y) [! ]* S$ H+ F0 C$ f [root@python-flask openssl-1.1.1n]# make install 9 r4 ?. R; }+ B- J9 X
/ R( z4 J- ^8 Eopenssl安装完成。5 A) t- |& O% B2 L2 k! }1 H, q
9 e9 `# ]! O' {6 d. U( O1 q
重新安装python
o3 a3 d- B* Y$ o! b) c( R! C2 |% e! a2 q/ u1 x
" W4 f4 R# V( X
[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 这个一定别漏
: S. e; m: ]8 J( Y- U4 H# o
/ G0 u' H# X1 G5 s
6 R2 k2 l& _# q' F+ p2 o' {1 x* C6 j
make 或者make -j 都可以
9 \1 V( @+ W" D1 ^1 F: B7 F6 e |! z9 Z+ H2 F V
然后执行make install . U, w0 ^* U9 E
- ~" D" ~0 A$ F7 o) P7 I( p4 I$ z
python 安装完成。$ W5 I4 g; }2 V
1 i! [6 V2 x# a# q, {6 `
G, m" X* |) \7 D ln -sf /usr/local/python312/bin/python3.12 /usr/bin/python3.12( J$ M1 x. N6 N( |$ i
/ F7 y: h+ g. c) u6 j# V ?' m
+ \: H# F) G7 S4 {' o
3 c/ {& a4 J1 l! W% m
Q5 V) d: {* m a! X3 P1 G' u$ o! k- I4 Y3 M
8 k$ C- a0 q+ m$ Y: P
4 K7 l' m6 _! e5 z |
|