1. 程式人生 > 實用技巧 >Centos7 安裝解除安裝Python

Centos7 安裝解除安裝Python

1、解除安裝已有的python3

#解除安裝pyhton3
[root@kycxnode111 ~]# rpm -qa|grep python3|xargs rpm -ev --allmatches --nodeps 
軟體包準備中...
python3-libs-3.6.8-13.el7.x86_64
python3-pip-9.0.3-7.el7_7.noarch
python3-setuptools-39.2.0-10.el7.noarch
python3-3.6.8-13.el7.x86_64

#刪除所有殘餘檔案
[root@kycxnode111 ~]# whereis python3 |xargs
rm -frv 已刪除目錄:"/usr/lib/python3.6/site-packages/__pycache__" 已刪除目錄:"/usr/lib/python3.6/site-packages" 已刪除目錄:"/usr/lib/python3.6" # 檢視目前系統中的python [root@kycxnode111 ~]# whereis python python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python2.7-config /usr/lib/python2.7 /usr/lib64/python2.7 /etc/python /usr/include/python2.7 /usr/share/man
/man1/python.1.gz

2、下載安裝最新的python

1)、安裝依賴包

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc* make -y
[root@kycxnode111 ~]# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc* make -y
已載入外掛:fastestmirror
Loading mirror speeds from cached hostfile
epel
/x86_64/metalink | 6.6 kB 00:00:00 * base: mirror.bit.edu.cn * epel: d2lzkl7pfhq30w.cloudfront.net * extras: mirror.bit.edu.cn * updates: mirrors.aliyun.com base | 3.6 kB 00:00:00 docker-ce-stable | 3.5 kB 00:00:00 epel | 4.7 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/3): updates/7/x86_64/primary_db | 4.5 MB 00:00:12 (2/3): epel/x86_64/updateinfo

2、下載python的安裝包

wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz

PS:這裡下載python3.8.5 是因為要與後面系統中的Django的穩定性好

3、解壓python安裝包

tar -xvf Python-3.8.5.tgz

4、配置安裝路徑

切入到解壓目錄下

cd Python-3.8.5/

./configure prefix=/usr/local/python3
  1 [root@kycxnode111 Python-3.8.5]# ls
  2 aclocal.m4          configure     Include     m4               Modules  PCbuild        README.rst
  3 CODE_OF_CONDUCT.md  configure.ac  install-sh  Mac              Objects  Programs       setup.py
  4 config.guess        Doc           Lib         Makefile.pre.in  Parser   pyconfig.h.in  Tools
  5 config.sub          Grammar       LICENSE     Misc             PC       Python
  6 [root@kycxnode111 Python-3.8.5]# ./configure prefix=/usr/local/python3
  7 checking build system type... x86_64-pc-linux-gnu
  8 checking host system type... x86_64-pc-linux-gnu
  9 checking for python3.8... no
 10 checking for python3... no
 11 checking for python... python
 12 checking for --enable-universalsdk... no
 13 checking for --with-universal-archs... no
 14 checking MACHDEP... "linux"
 15 checking for gcc... gcc
 16 checking whether the C compiler works... yes
 17 checking for C compiler default output file name... a.out
 18 checking for suffix of executables...
 19 checking whether we are cross compiling... no
 20 checking for suffix of object files... o
 21 checking whether we are using the GNU C compiler... yes
 22 checking whether gcc accepts -g... yes
 23 checking for gcc option to accept ISO C89... none needed
 24 checking how to run the C preprocessor... gcc -E
 25 checking for grep that handles long lines and -e... /usr/bin/grep
 26 checking for a sed that does not truncate output... /usr/bin/sed
 27 checking for --with-cxx-main=<compiler>... no
 28 checking for g++... no
 29 configure:
 30 
 31   By default, distutils will build C++ extension modules with "g++".
 32   If this is not intended, then set CXX on the configure command line.
 33 
 34 checking for the platform triplet based on compiler characteristics... x86_64-linux-gnu
 35 checking for -Wl,--no-as-needed... yes
 36 checking for egrep... /usr/bin/grep -E
 37 checking for ANSI C header files... yes
 38 checking for sys/types.h... yes
 39 checking for sys/stat.h... yes
 40 checking for stdlib.h... yes
 41 checking for string.h... yes
 42 checking for memory.h... yes
 43 checking for strings.h... yes
 44 checking for inttypes.h... yes
 45 checking for stdint.h... yes
 46 checking for unistd.h... yes
 47 checking minix/config.h usability... no
 48 checking minix/config.h presence... no
 49 checking for minix/config.h... no
 50 checking whether it is safe to define __EXTENSIONS__... yes
 51 checking for the Android API level... not Android
 52 checking for --with-suffix...
 53 checking for case-insensitive build directory... no
 54 checking LIBRARY... libpython$(VERSION)$(ABIFLAGS).a
 55 checking LINKCC... $(PURIFY) $(MAINCC)
 56 checking for GNU ld... yes
 57 checking for --enable-shared... no
 58 checking for --enable-profiling... no
 59 checking LDLIBRARY... libpython$(VERSION)$(ABIFLAGS).a
 60 checking for ar... ar
 61 checking for readelf... readelf
 62 checking for a BSD-compatible install... /usr/bin/install -c
 63 checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
 64 checking for --with-pydebug... no
 65 checking for --with-trace-refs... no
 66 checking for --with-assertions... no
 67 checking for --enable-optimizations... no
 68 checking PROFILE_TASK... -m test --pgo
 69 checking for --with-lto... no
 70 checking for llvm-profdata... no
 71 checking for -Wextra... yes
 72 checking whether gcc accepts and needs -fno-strict-aliasing... no
 73 checking if we can turn off gcc unused result warning... yes
 74 checking if we can turn off gcc unused parameter warning... yes
 75 checking if we can turn off gcc missing field initializers warning... yes
 76 checking if we can turn on gcc mixed sign comparison warning... yes
 77 checking if we can turn on gcc unreachable code warning... no
 78 checking if we can turn on gcc strict-prototypes warning... no
 79 checking if we can make implicit function declaration an error in gcc... yes
 80 checking whether pthreads are available without options... no
 81 checking whether gcc accepts -Kpthread... no
 82 checking whether gcc accepts -Kthread... no
 83 checking whether gcc accepts -pthread... yes
 84 checking whether g++ also accepts flags for thread support... yes
 85 checking for ANSI C header files... (cached) yes
 86 checking asm/types.h usability... yes
 87 checking asm/types.h presence... yes
 88 checking for asm/types.h... yes
 89 checking crypt.h usability... yes
 90 checking crypt.h presence... yes
 91 checking for crypt.h... yes
 92 checking conio.h usability... no
 93 checking conio.h presence... no
 94 checking for conio.h... no
 95 checking direct.h usability... no
 96 checking direct.h presence... no
 97 checking for direct.h... no
 98 checking dlfcn.h usability... yes
 99 checking dlfcn.h presence... yes
100 checking for dlfcn.h... yes
101 checking errno.h usability... yes
102 checking errno.h presence... yes
103 checking for errno.h... yes
104 checking fcntl.h usability... yes
105 checking fcntl.h presence... yes
106 checking for fcntl.h... yes
107 checking grp.h usability... yes
108 checking grp.h presence... yes
109 checking for grp.h... yes
110 checking ieeefp.h usability... no
111 checking ieeefp.h presence... no
112 checking for ieeefp.h... no
113 checking io.h usability... no
114 checking io.h presence... no
115 checking for io.h... no
116 checking langinfo.h usability... yes
117 checking langinfo.h presence... yes
118 checking for langinfo.h... yes
119 checking libintl.h usability... yes
120 checking libintl.h presence... yes
121 checking for libintl.h... yes
122 checking process.h usability... no
123 checking process.h presence... no
124 checking for process.h... no
125 checking pthread.h usability... yes
126 checking pthread.h presence... yes
127 checking for pthread.h... yes
128 checking sched.h usability... yes
129 checking sched.h presence... yes
130 checking for sched.h... yes
131 checking shadow.h usability... yes
132 checking shadow.h presence... yes
133 checking for shadow.h... yes
134 checking signal.h usability... yes
135 checking signal.h presence... yes
136 checking for signal.h... yes
137 checking stropts.h usability... no
138 checking stropts.h presence... no
139 checking for stropts.h... no
140 checking termios.h usability... yes
141 checking termios.h presence... yes
142 checking for termios.h... yes
143 checking utime.h usability... yes
144 checking utime.h presence... yes
145 checking for utime.h... yes
146 checking poll.h usability... yes
147 checking poll.h presence... yes
148 checking for poll.h... yes
149 checking sys/devpoll.h usability... no
150 checking sys/devpoll.h presence... no
151 checking for sys/devpoll.h... no
152 checking sys/epoll.h usability... yes
153 checking sys/epoll.h presence... yes
154 checking for sys/epoll.h... yes
155 checking sys/poll.h usability... yes
156 checking sys/poll.h presence... yes
157 checking for sys/poll.h... yes
158 checking sys/audioio.h usability... no
159 checking sys/audioio.h presence... no
160 checking for sys/audioio.h... no
161 checking sys/xattr.h usability... yes
162 checking sys/xattr.h presence... yes
163 checking for sys/xattr.h... yes
164 checking sys/bsdtty.h usability... no
165 checking sys/bsdtty.h presence... no
166 checking for sys/bsdtty.h... no
167 checking sys/event.h usability... no
168 checking sys/event.h presence... no
169 checking for sys/event.h... no
170 checking sys/file.h usability... yes
171 checking sys/file.h presence... yes
172 checking for sys/file.h... yes
173 checking sys/ioctl.h usability... yes
174 checking sys/ioctl.h presence... yes
175 checking for sys/ioctl.h... yes
176 checking sys/kern_control.h usability... no
177 checking sys/kern_control.h presence... no
178 checking for sys/kern_control.h... no
179 checking sys/loadavg.h usability... no
180 checking sys/loadavg.h presence... no
181 checking for sys/loadavg.h... no
182 checking sys/lock.h usability... no
183 checking sys/lock.h presence... no
184 checking for sys/lock.h... no
185 checking sys/mkdev.h usability... no
186 checking sys/mkdev.h presence... no
187 checking for sys/mkdev.h... no
188 checking sys/modem.h usability... no
189 checking sys/modem.h presence... no
190 checking for sys/modem.h... no
191 checking sys/param.h usability... yes
192 checking sys/param.h presence... yes
193 checking for sys/param.h... yes
194 checking sys/random.h usability... no
195 checking sys/random.h presence... no
196 checking for sys/random.h... no
197 checking sys/select.h usability... yes
198 checking sys/select.h presence... yes
199 checking for sys/select.h... yes
200 checking sys/sendfile.h usability... yes
201 checking sys/sendfile.h presence... yes
202 checking for sys/sendfile.h... yes
203 checking sys/socket.h usability... yes
204 checking sys/socket.h presence... yes
205 checking for sys/socket.h... yes
206 checking sys/statvfs.h usability... yes
207 checking sys/statvfs.h presence... yes
208 checking for sys/statvfs.h... yes
209 checking for sys/stat.h... (cached) yes
210 checking sys/syscall.h usability... yes
211 checking sys/syscall.h presence... yes
212 checking for sys/syscall.h... yes
213 checking sys/sys_domain.h usability... no
214 checking sys/sys_domain.h presence... no
215 checking for sys/sys_domain.h... no
216 checking sys/termio.h usability... no
217 checking sys/termio.h presence... no
218 checking for sys/termio.h... no
219 checking sys/time.h usability... yes
220 checking sys/time.h presence... yes
221 checking for sys/time.h... yes
222 checking sys/times.h usability... yes
223 checking sys/times.h presence... yes
224 checking for sys/times.h... yes
225 checking for sys/types.h... (cached) yes
226 checking sys/uio.h usability... yes
227 checking sys/uio.h presence... yes
228 checking for sys/uio.h... yes
229 checking sys/un.h usability... yes
230 checking sys/un.h presence... yes
231 checking for sys/un.h... yes
232 checking sys/utsname.h usability... yes
233 checking sys/utsname.h presence... yes
234 checking for sys/utsname.h... yes
235 checking sys/wait.h usability... yes
236 checking sys/wait.h presence... yes
237 checking for sys/wait.h... yes
238 checking pty.h usability... yes
239 checking pty.h presence... yes
240 checking for pty.h... yes
241 checking libutil.h usability... no
242 checking libutil.h presence... no
243 checking for libutil.h... no
244 checking sys/resource.h usability... yes
245 checking sys/resource.h presence... yes
246 checking for sys/resource.h... yes
247 checking netpacket/packet.h usability... yes
248 checking netpacket/packet.h presence... yes
249 checking for netpacket/packet.h... yes
250 checking sysexits.h usability... yes
251 checking sysexits.h presence... yes
252 checking for sysexits.h... yes
253 checking bluetooth.h usability... no
254 checking bluetooth.h presence... no
255 checking for bluetooth.h... no
256 checking linux/tipc.h usability... yes
257 checking linux/tipc.h presence... yes
258 checking for linux/tipc.h... yes
259 checking linux/random.h usability... yes
260 checking linux/random.h presence... yes
261 checking for linux/random.h... yes
262 checking spawn.h usability... yes
263 checking spawn.h presence... yes
264 checking for spawn.h... yes
265 checking util.h usability... no
266 checking util.h presence... no
267 checking for util.h... no
268 checking alloca.h usability... yes
269 checking alloca.h presence... yes
270 checking for alloca.h... yes
271 checking endian.h usability... yes
272 checking endian.h presence... yes
273 checking for endian.h... yes
274 checking sys/endian.h usability... no
275 checking sys/endian.h presence... no
276 checking for sys/endian.h... no
277 checking sys/sysmacros.h usability... yes
278 checking sys/sysmacros.h presence... yes
279 checking for sys/sysmacros.h... yes
280 checking linux/memfd.h usability... yes
281 checking linux/memfd.h presence... yes
282 checking for linux/memfd.h... yes
283 checking sys/memfd.h usability... no
284 checking sys/memfd.h presence... no
285 checking for sys/memfd.h... no
286 checking sys/mman.h usability... yes
287 checking sys/mman.h presence... yes
288 checking for sys/mman.h... yes
289 checking for dirent.h that defines DIR... yes
290 checking for library containing opendir... none required
291 checking whether sys/types.h defines makedev... yes
292 checking bluetooth/bluetooth.h usability... no
293 checking bluetooth/bluetooth.h presence... no
294 checking for bluetooth/bluetooth.h... no
295 checking for net/if.h... yes
296 checking for linux/netlink.h... yes
297 checking for linux/qrtr.h... no
298 checking for linux/vm_sockets.h... yes
299 checking for linux/can.h... yes
300 checking for linux/can/raw.h... yes
301 checking for linux/can/bcm.h... yes
302 checking for clock_t in time.h... yes
303 checking for makedev... yes
304 checking for le64toh... yes
305 checking for mode_t... yes
306 checking for off_t... yes
307 checking for pid_t... yes
308 checking for size_t... yes
309 checking for uid_t in sys/types.h... yes
310 checking for ssize_t... yes
311 checking for __uint128_t... yes
312 checking size of int... 4
313 checking size of long... 8
314 checking size of long long... 8
315 checking size of void *... 8
316 checking size of short... 2
317 checking size of float... 4
318 checking size of double... 8
319 checking size of fpos_t... 16
320 checking size of size_t... 8
321 checking size of pid_t... 4
322 checking size of uintptr_t... 8
323 checking for long double... yes
324 checking size of long double... 16
325 checking size of _Bool... 1
326 checking size of off_t... 8
327 checking whether to enable large file support... no
328 checking size of time_t... 8
329 checking for pthread_t... yes
330 checking size of pthread_t... 8
331 checking size of pthread_key_t... 4
332 checking whether pthread_key_t is compatible with int... yes
333 checking for --enable-framework... no
334 checking for dyld... no
335 checking the extension of shared libraries... .so
336 checking LDSHARED... $(CC) -shared
337 checking CCSHARED... -fPIC
338 checking LINKFORSHARED... -Xlinker -export-dynamic
339 checking CFLAGSFORSHARED...
340 checking SHLIBS... $(LIBS)
341 checking for sendfile in -lsendfile... no
342 checking for dlopen in -ldl... yes
343 checking for shl_load in -ldld... no
344 checking uuid/uuid.h usability... yes
345 checking uuid/uuid.h presence... yes
346 checking for uuid/uuid.h... yes
347 checking uuid.h usability... no
348 checking uuid.h presence... no
349 checking for uuid.h... no
350 checking for uuid_generate_time_safe... yes
351 checking for uuid_create... no
352 checking for uuid_enc_be... no
353 checking for library containing sem_init... -lpthread
354 checking for textdomain in -lintl... no
355 checking aligned memory access is required... no
356 checking for --with-hash-algorithm... default
357 checking for --with-address-sanitizer... no
358 checking for --with-memory-sanitizer... no
359 checking for --with-undefined-behavior-sanitizer... no
360 checking for t_open in -lnsl... no
361 checking for socket in -lsocket... no
362 checking for --with-libs... no
363 checking for pkg-config... /usr/bin/pkg-config
364 checking pkg-config is at least version 0.9.0... yes
365 checking for --with-system-expat... no
366 checking for --with-system-ffi... yes
367 checking for --with-system-libmpdec... no
368 checking for --with-decimal-contextvar... yes
369 checking for --enable-loadable-sqlite-extensions... no
370 checking for --with-tcltk-includes... default
371 checking for --with-tcltk-libs... default
372 checking for --with-dbmliborder...
373 checking if PTHREAD_SCOPE_SYSTEM is supported... yes
374 checking for pthread_sigmask... yes
375 checking for pthread_getcpuclockid... yes
376 checking if --enable-ipv6 is specified... yes
377 checking if RFC2553 API is available... yes
378 checking ipv6 stack type... linux-glibc
379 checking for CAN_RAW_FD_FRAMES... yes
380 checking for --with-doc-strings... yes
381 checking for --with-pymalloc... yes
382 checking for --with-c-locale-coercion... yes
383 checking for --with-valgrind... no
384 checking for --with-dtrace... no
385 checking for dlopen... yes
386 checking DYNLOADFILE... dynload_shlib.o
387 checking MACHDEP_OBJS... none
388 checking for alarm... yes
389 checking for accept4... yes
390 checking for setitimer... yes
391 checking for getitimer... yes
392 checking for bind_textdomain_codeset... yes
393 checking for chown... yes
394 checking for clock... yes
395 checking for confstr... yes
396 checking for copy_file_range... no
397 checking for ctermid... yes
398 checking for dup3... yes
399 checking for execv... yes
400 checking for explicit_bzero... no
401 checking for explicit_memset... no
402 checking for faccessat... yes
403 checking for fchmod... yes
404 checking for fchmodat... yes
405 checking for fchown... yes
406 checking for fchownat... yes
407 checking for fdwalk... no
408 checking for fexecve... yes
409 checking for fdopendir... yes
410 checking for fork... yes
411 checking for fpathconf... yes
412 checking for fstatat... yes
413 checking for ftime... yes
414 checking for ftruncate... yes
415 checking for futimesat... yes
416 checking for futimens... yes
417 checking for futimes... yes
418 checking for gai_strerror... yes
419 checking for getentropy... no
420 checking for getgrgid_r... yes
421 checking for getgrnam_r... yes
422 checking for getgrouplist... yes
423 checking for getgroups... yes
424 checking for getlogin... yes
425 checking for getloadavg... yes
426 checking for getpeername... yes
427 checking for getpgid... yes
428 checking for getpid... yes
429 checking for getpriority... yes
430 checking for getresuid... yes
431 checking for getresgid... yes
432 checking for getpwent... yes
433 checking for getpwnam_r... yes
434 checking for getpwuid_r... yes
435 checking for getspnam... yes
436 checking for getspent... yes
437 checking for getsid... yes
438 checking for getwd... yes
439 checking for if_nameindex... yes
440 checking for initgroups... yes
441 checking for kill... yes
442 checking for killpg... yes
443 checking for lchown... yes
444 checking for lockf... yes
445 checking for linkat... yes
446 checking for lstat... yes
447 checking for lutimes... yes
448 checking for mmap... yes
449 checking for memrchr... yes
450 checking for mbrtowc... yes
451 checking for mkdirat... yes
452 checking for mkfifo... yes
453 checking for madvise... yes
454 checking for mkfifoat... yes
455 checking for mknod... yes
456 checking for mknodat... yes
457 checking for mktime... yes
458 checking for mremap... yes
459 checking for nice... yes
460 checking for openat... yes
461 checking for pathconf... yes
462 checking for pause... yes
463 checking for pipe2... yes
464 checking for plock... no
465 checking for poll... yes
466 checking for posix_fallocate... yes
467 checking for posix_fadvise... yes
468 checking for posix_spawn... yes
469 checking for posix_spawnp... yes
470 checking for pread... yes
471 checking for preadv... yes
472 checking for preadv2... no
473 checking for pthread_condattr_setclock... yes
474 checking for pthread_init... no
475 checking for pthread_kill... yes
476 checking for putenv... yes
477 checking for pwrite... yes
478 checking for pwritev... yes
479 checking for pwritev2... no
480 checking for readlink... yes
481 checking for readlinkat... yes
482 checking for readv... yes
483 checking for realpath... yes
484 checking for renameat... yes
485 checking for sem_open... yes
486 checking for sem_timedwait... yes
487 checking for sem_getvalue... yes
488 checking for sem_unlink... yes
489 checking for sendfile... yes
490 checking for setegid... yes
491 checking for seteuid... yes
492 checking for setgid... yes
493 checking for sethostname... yes
494 checking for setlocale... yes
495 checking for setregid... yes
496 checking for setreuid... yes
497 checking for setresuid... yes
498 checking for setresgid... yes
499 checking for setsid... yes
500 checking for setpgid... yes
501 checking for setpgrp... yes
502 checking for setpriority... yes
503 checking for setuid... yes
504 checking for setvbuf... yes
505 checking for sched_get_priority_max... yes
506 checking for sched_setaffinity... yes
507 checking for sched_setscheduler... yes
508 checking for sched_setparam... yes
509 checking for sched_rr_get_interval... yes
510 checking for sigaction... yes
511 checking for sigaltstack... yes
512 checking for sigfillset... yes
513 checking for siginterrupt... yes
514 checking for sigpending... yes
515 checking for sigrelse... yes
516 checking for sigtimedwait... yes
517 checking for sigwait... yes
518 checking for sigwaitinfo... yes
519 checking for snprintf... yes
520 checking for strftime... yes
521 checking for strlcpy... no
522 checking for strsignal... yes
523 checking for symlinkat... yes
524 checking for sync... yes
525 checking for sysconf... yes
526 checking for tcgetpgrp... yes
527 checking for tcsetpgrp... yes
528 checking for tempnam... yes
529 checking for timegm... yes
530 checking for times... yes
531 checking for tmpfile... yes
532 checking for tmpnam... yes
533 checking for tmpnam_r... yes
534 checking for truncate... yes
535 checking for uname... yes
536 checking for unlinkat... yes
537 checking for unsetenv... yes
538 checking for utimensat... yes
539 checking for utimes... yes
540 checking for waitid... yes
541 checking for waitpid... yes
542 checking for wait3... yes
543 checking for wait4... yes
544 checking for wcscoll... yes
545 checking for wcsftime... yes
546 checking for wcsxfrm... yes
547 checking for wmemcmp... yes
548 checking for writev... yes
549 checking for _getpty... no
550 checking for rtpSpawn... no
551 checking whether dirfd is declared... yes
552 checking for chroot... yes
553 checking for link... yes
554 checking for symlink... yes
555 checking for fchdir... yes
556 checking for fsync... yes
557 checking for fdatasync... yes
558 checking for epoll... yes
559 checking for epoll_create1... yes
560 checking for kqueue... no
561 checking for prlimit... yes
562 checking for memfd_create... no
563 checking for ctermid_r... no
564 checking for flock declaration... yes
565 checking for flock... yes
566 checking for getpagesize... yes
567 checking for broken unsetenv... no
568 checking for true... true
569 checking for inet_aton in -lc... yes
570 checking for chflags... no
571 checking for lchflags... no
572 checking for inflateCopy in -lz... yes
573 checking for hstrerror... yes
574 checking for inet_aton... yes
575 checking for inet_pton... yes
576 checking for setgroups... yes
577 checking for openpty... no
578 checking for openpty in -lutil... yes
579 checking for forkpty... yes
580 checking for fseek64... no
581 checking for fseeko... yes
582 checking for fstatvfs... yes
583 checking for ftell64... no
584 checking for ftello... yes
585 checking for statvfs... yes
586 checking for dup2... yes
587 checking for strdup... yes
588 checking for getpgrp... yes
589 checking for setpgrp... (cached) yes
590 checking for gettimeofday... yes
591 checking for library containing crypt... -lcrypt
592 checking for library containing crypt_r... none required
593 checking for crypt_r... yes
594 checking for clock_gettime... yes
595 checking for clock_getres... yes
596 checking for clock_settime... yes
597 checking for major... yes
598 checking for getaddrinfo... yes
599 checking getaddrinfo bug... no
600 checking for getnameinfo... yes
601 checking whether time.h and sys/time.h may both be included... yes
602 checking whether struct tm is in sys/time.h or time.h... time.h
603 checking for struct tm.tm_zone... yes
604 checking for struct stat.st_rdev... yes
605 checking for struct stat.st_blksize... yes
606 checking for struct stat.st_flags... no
607 checking for struct stat.st_gen... no
608 checking for struct stat.st_birthtime... no
609 checking for struct stat.st_blocks... yes
610 checking for struct passwd.pw_gecos... yes
611 checking for struct passwd.pw_passwd... yes
612 checking for siginfo_t.si_band... yes
613 checking for time.h that defines altzone... no
614 checking whether sys/select.h and sys/time.h may both be included... yes
615 checking for addrinfo... yes
616 checking for sockaddr_storage... yes
617 checking for sockaddr_alg... yes
618 checking whether char is unsigned... no
619 checking for an ANSI C-conforming const... yes
620 checking for working signed char... yes
621 checking for prototypes... yes
622 checking for variable length prototypes and stdarg.h... yes
623 checking for socketpair... yes
624 checking if sockaddr has sa_len member... no
625 checking for gethostbyname_r... yes
626 checking gethostbyname_r with 6 args... yes
627 checking for __fpu_control... yes
628 checking for --with-libm=STRING... default LIBM="-lm"
629 checking for --with-libc=STRING... default LIBC=""
630 checking for x64 gcc inline assembler... yes
631 checking whether float word ordering is bigendian... no
632 checking whether we can use gcc inline assembler to get and set x87 control word... yes
633 checking whether we can use gcc inline assembler to get and set mc68881 fpcr... no
634 checking for x87-style double rounding... no
635 checking for acosh... yes
636 checking for asinh... yes
637 checking for atanh... yes
638 checking for copysign... yes
639 checking for erf... yes
640 checking for erfc... yes
641 checking for expm1... yes
642 checking for finite... yes
643 checking for gamma... yes
644 checking for hypot... yes
645 checking for lgamma... yes
646 checking for log1p... yes
647 checking for log2... yes
648 checking for round... yes
649 checking for tgamma... yes
650 checking whether isinf is declared... yes
651 checking whether isnan is declared... yes
652 checking whether isfinite is declared... yes
653 checking whether POSIX semaphores are enabled... yes
654 checking for broken sem_getvalue... no
655 checking whether RTLD_LAZY is declared... yes
656 checking whether RTLD_NOW is declared... yes
657 checking whether RTLD_GLOBAL is declared... yes
658 checking whether RTLD_LOCAL is declared... yes
659 checking whether RTLD_NODELETE is declared... yes
660 checking whether RTLD_NOLOAD is declared... yes
661 checking whether RTLD_DEEPBIND is declared... yes
662 checking whether RTLD_MEMBER is declared... no
663 checking digit size for Python's longs... no value specified
664 checking wchar.h usability... yes
665 checking wchar.h presence... yes
666 checking for wchar.h... yes
667 checking size of wchar_t... 4
668 checking for UCS-4 tcl... no
669 checking whether wchar_t is signed... yes
670 checking whether wchar_t is usable... no
671 checking whether byte ordering is bigendian... no
672 checking ABIFLAGS...
673 checking SOABI... cpython-38-x86_64-linux-gnu
674 checking LDVERSION... $(VERSION)$(ABIFLAGS)
675 checking whether right shift extends the sign bit... yes
676 checking for getc_unlocked() and friends... yes
677 checking how to link readline libs... -lreadline
678 checking for rl_pre_input_hook in -lreadline... yes
679 checking for rl_completion_display_matches_hook in -lreadline... yes
680 checking for rl_resize_terminal in -lreadline... yes
681 checking for rl_completion_matches in -lreadline... yes
682 checking for append_history in -lreadline... yes
683 checking for broken nice()... no
684 checking for broken poll()... no
685 checking for working tzset()... yes
686 checking for tv_nsec in struct stat... yes
687 checking for tv_nsec2 in struct stat... no
688 checking curses.h usability... yes
689 checking curses.h presence... yes
690 checking for curses.h... yes
691 checking ncurses.h usability... yes
692 checking ncurses.h presence... yes
693 checking for ncurses.h... yes
694 checking for term.h... yes
695 checking whether mvwdelch is an expression... yes
696 checking whether WINDOW has _flags... yes
697 checking for is_pad... yes
698 checking for is_term_resized... yes
699 checking for resize_term... yes
700 checking for resizeterm... yes
701 checking for immedok... yes
702 checking for syncok... yes
703 checking for wchgat... yes
704 checking for filter... yes
705 checking for has_key... yes
706 checking for typeahead... yes
707 checking for use_env... yes
708 configure: checking for device files
709 checking for /dev/ptmx... yes
710 checking for /dev/ptc... no
711 checking for %zd printf() format support... yes
712 checking for socklen_t... yes
713 checking for broken mbstowcs... no
714 checking for --with-computed-gotos... no value specified
715 checking whether gcc -pthread supports computed gotos... yes
716 checking for build directories... done
717 checking for -O2... yes
718 checking for glibc _FORTIFY_SOURCE/memmove bug... no
719 checking for gcc ipa-pure-const bug... no
720 checking for stdatomic.h... no
721 checking for GCC >= 4.7 __atomic builtins... yes
722 checking for ensurepip... upgrade
723 checking if the dirent structure of a d_type field... yes
724 checking for the Linux getrandom() syscall... yes
725 checking for the getrandom() function... no
726 checking for library containing shm_open... -lrt
727 checking for sys/mman.h... (cached) yes
728 checking for shm_open... yes
729 checking for shm_unlink... yes
730 checking for pkg-config... /usr/bin/pkg-config
731 checking whether compiling and linking against OpenSSL works... yes
732 checking for X509_VERIFY_PARAM_set1_host in libssl... yes
733 checking for --with-ssl-default-suites... python
734 configure: creating ./config.status
735 config.status: creating Makefile.pre
736 config.status: creating Misc/python.pc
737 config.status: creating Misc/python-embed.pc
738 config.status: creating Misc/python-config.sh
739 config.status: creating Modules/ld_so_aix
740 config.status: creating pyconfig.h
741 creating Modules/Setup.local
742 creating Makefile
743 
744 
745 If you want a release build with all stable optimizations active (PGO, etc),
746 please run ./configure --enable-optimizations
[root@kycxnode111 Python-3.8.5]# ./configure --enable-optimizations
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.8... no
checking for python3... no
checking for python... python
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "linux"
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for a sed that does not truncate output... /usr/bin/sed
checking for --with-cxx-main=<compiler>... no
checking for g++... no
configure:

  By default, distutils will build C++ extension modules with "g++".
  If this is not intended, then set CXX on the configure command line.

checking for the platform triplet based on compiler characteristics... x86_64-linux-gnu
checking for -Wl,--no-as-needed... yes
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for the Android API level... not Android
checking for --with-suffix...
checking for case-insensitive build directory... no
checking LIBRARY... libpython$(VERSION)$(ABIFLAGS).a
checking LINKCC... $(PURIFY) $(MAINCC)
checking for GNU ld... yes
checking for --enable-shared... no
checking for --enable-profiling... no
checking LDLIBRARY... libpython$(VERSION)$(ABIFLAGS).a
checking for ar... ar
checking for readelf... readelf
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for --with-pydebug... no
checking for --with-trace-refs... no
checking for --with-assertions... no
checking for --enable-optimizations... yes
checking PROFILE_TASK... -m test --pgo
checking for --with-lto... no
checking for llvm-profdata... no
checking for -Wextra... yes
checking whether gcc accepts and needs -fno-strict-aliasing... no
checking if we can turn off gcc unused result warning... yes
checking if we can turn off gcc unused parameter warning... yes
checking if we can turn off gcc missing field initializers warning... yes
checking if we can turn on gcc mixed sign comparison warning... yes
checking if we can turn on gcc unreachable code warning... no
checking if we can turn on gcc strict-prototypes warning... no
checking if we can make implicit function declaration an error in gcc... yes
checking whether pthreads are available without options... no
checking whether gcc accepts -Kpthread... no
checking whether gcc accepts -Kthread... no
checking whether gcc accepts -pthread... yes
checking whether g++ also accepts flags for thread support... yes
checking for ANSI C header files... (cached) yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking crypt.h usability... yes
checking crypt.h presence... yes
checking for crypt.h... yes
checking conio.h usability... no
checking conio.h presence... no
checking for conio.h... no
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking shadow.h usability... yes
checking shadow.h presence... yes
checking for shadow.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking stropts.h usability... no
checking stropts.h presence... no
checking for stropts.h... no
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking sys/epoll.h usability... yes
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/audioio.h usability... no
checking sys/audioio.h presence... no
checking for sys/audioio.h... no
checking sys/xattr.h usability... yes
checking sys/xattr.h presence... yes
checking for sys/xattr.h... yes
checking sys/bsdtty.h usability... no
checking sys/bsdtty.h presence... no
checking for sys/bsdtty.h... no
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/kern_control.h usability... no
checking sys/kern_control.h presence... no
checking for sys/kern_control.h... no
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking sys/lock.h usability... no
checking sys/lock.h presence... no
checking for sys/lock.h... no
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/modem.h usability... no
checking sys/modem.h presence... no
checking for sys/modem.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/random.h usability... no
checking sys/random.h presence... no
checking for sys/random.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/sendfile.h usability... yes
checking sys/sendfile.h presence... yes
checking for sys/sendfile.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking for sys/stat.h... (cached) yes
checking sys/syscall.h usability... yes
checking sys/syscall.h presence... yes
checking for sys/syscall.h... yes
checking sys/sys_domain.h usability... no
checking sys/sys_domain.h presence... no
checking for sys/sys_domain.h... no
checking sys/termio.h usability... no
checking sys/termio.h presence... no
checking for sys/termio.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for sys/types.h... (cached) yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking pty.h usability... yes
checking pty.h presence... yes
checking for pty.h... yes
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking netpacket/packet.h usability... yes
checking netpacket/packet.h presence... yes
checking for netpacket/packet.h... yes
checking sysexits.h usability... yes
checking sysexits.h presence... yes
checking for sysexits.h... yes
checking bluetooth.h usability... no
checking bluetooth.h presence... no
checking for bluetooth.h... no
checking linux/tipc.h usability... yes
checking linux/tipc.h presence... yes
checking for linux/tipc.h... yes
checking linux/random.h usability... yes
checking linux/random.h presence... yes
checking for linux/random.h... yes
checking spawn.h usability... yes
checking spawn.h presence... yes
checking for spawn.h... yes
checking util.h usability... no
checking util.h presence... no
checking for util.h... no
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/sysmacros.h usability... yes
checking sys/sysmacros.h presence... yes
checking for sys/sysmacros.h... yes
checking linux/memfd.h usability... yes
checking linux/memfd.h presence... yes
checking for linux/memfd.h... yes
checking sys/memfd.h usability... no
checking sys/memfd.h presence... no
checking for sys/memfd.h... no
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether sys/types.h defines makedev... yes
checking bluetooth/bluetooth.h usability... no
checking bluetooth/bluetooth.h presence... no
checking for bluetooth/bluetooth.h... no
checking for net/if.h... yes
checking for linux/netlink.h... yes
checking for linux/qrtr.h... no
checking for linux/vm_sockets.h... yes
checking for linux/can.h... yes
checking for linux/can/raw.h... yes
checking for linux/can/bcm.h... yes
checking for clock_t in time.h... yes
checking for makedev... yes
checking for le64toh... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for ssize_t... yes
checking for __uint128_t... yes
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of void *... 8
checking size of short... 2
checking size of float... 4
checking size of double... 8
checking size of fpos_t... 16
checking size of size_t... 8
checking size of pid_t... 4
checking size of uintptr_t... 8
checking for long double... yes
checking size of long double... 16
checking size of _Bool... 1
checking size of off_t... 8
checking whether to enable large file support... no
checking size of time_t... 8
checking for pthread_t... yes
checking size of pthread_t... 8
checking size of pthread_key_t... 4
checking whether pthread_key_t is compatible with int... yes
checking for --enable-framework... no
checking for dyld... no
checking the extension of shared libraries... .so
checking LDSHARED... $(CC) -shared
checking CCSHARED... -fPIC
checking LINKFORSHARED... -Xlinker -export-dynamic
checking CFLAGSFORSHARED...
checking SHLIBS... $(LIBS)
checking for sendfile in -lsendfile... no
checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking uuid/uuid.h usability... yes
checking uuid/uuid.h presence... yes
checking for uuid/uuid.h... yes
checking uuid.h usability... no
checking uuid.h presence... no
checking for uuid.h... no
checking for uuid_generate_time_safe... yes
checking for uuid_create... no
checking for uuid_enc_be... no
checking for library containing sem_init... -lpthread
checking for textdomain in -lintl... no
checking aligned memory access is required... no
checking for --with-hash-algorithm... default
checking for --with-address-sanitizer... no
checking for --with-memory-sanitizer... no
checking for --with-undefined-behavior-sanitizer... no
checking for t_open in -lnsl... no
checking for socket in -lsocket... no
checking for --with-libs... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for --with-system-expat... no
checking for --with-system-ffi... yes
checking for --with-system-libmpdec... no
checking for --with-decimal-contextvar... yes
checking for --enable-loadable-sqlite-extensions... no
checking for --with-tcltk-includes... default
checking for --with-tcltk-libs... default
checking for --with-dbmliborder...
checking if PTHREAD_SCOPE_SYSTEM is supported... yes
checking for pthread_sigmask... yes
checking for pthread_getcpuclockid... yes
checking if --enable-ipv6 is specified... yes
checking if RFC2553 API is available... yes
checking ipv6 stack type... linux-glibc
checking for CAN_RAW_FD_FRAMES... yes
checking for --with-doc-strings... yes
checking for --with-pymalloc... yes
checking for --with-c-locale-coercion... yes
checking for --with-valgrind... no
checking for --with-dtrace... no
checking for dlopen... yes
checking DYNLOADFILE... dynload_shlib.o
checking MACHDEP_OBJS... none
checking for alarm... yes
checking for accept4... yes
checking for setitimer... yes
checking for getitimer... yes
checking for bind_textdomain_codeset... yes
checking for chown... yes
checking for clock... yes
checking for confstr... yes
checking for copy_file_range... no
checking for ctermid... yes
checking for dup3... yes
checking for execv... yes
checking for explicit_bzero... no
checking for explicit_memset... no
checking for faccessat... yes
checking for fchmod... yes
checking for fchmodat... yes
checking for fchown... yes
checking for fchownat... yes
checking for fdwalk... no
checking for fexecve... yes
checking for fdopendir... yes
checking for fork... yes
checking for fpathconf... yes
checking for fstatat... yes
checking for ftime... yes
checking for ftruncate... yes
checking for futimesat... yes
checking for futimens... yes
checking for futimes... yes
checking for gai_strerror... yes
checking for getentropy... no
checking for getgrgid_r... yes
checking for getgrnam_r... yes
checking for getgrouplist... yes
checking for getgroups... yes
checking for getlogin... yes
checking for getloadavg... yes
checking for getpeername... yes
checking for getpgid... yes
checking for getpid... yes
checking for getpriority... yes
checking for getresuid... yes
checking for getresgid... yes
checking for getpwent... yes
checking for getpwnam_r... yes
checking for getpwuid_r... yes
checking for getspnam... yes
checking for getspent... yes
checking for getsid... yes
checking for getwd... yes
checking for if_nameindex... yes
checking for initgroups... yes
checking for kill... yes
checking for killpg... yes
checking for lchown... yes
checking for lockf... yes
checking for linkat... yes
checking for lstat... yes
checking for lutimes... yes
checking for mmap... yes
checking for memrchr... yes
checking for mbrtowc... yes
checking for mkdirat... yes
checking for mkfifo... yes
checking for madvise... yes
checking for mkfifoat... yes
checking for mknod... yes
checking for mknodat... yes
checking for mktime... yes
checking for mremap... yes
checking for nice... yes
checking for openat... yes
checking for pathconf... yes
checking for pause... yes
checking for pipe2... yes
checking for plock... no
checking for poll... yes
checking for posix_fallocate... yes
checking for posix_fadvise... yes
checking for posix_spawn... yes
checking for posix_spawnp... yes
checking for pread... yes
checking for preadv... yes
checking for preadv2... no
checking for pthread_condattr_setclock... yes
checking for pthread_init... no
checking for pthread_kill... yes
checking for putenv... yes
checking for pwrite... yes
checking for pwritev... yes
checking for pwritev2... no
checking for readlink... yes
checking for readlinkat... yes
checking for readv... yes
checking for realpath... yes
checking for renameat... yes
checking for sem_open... yes
checking for sem_timedwait... yes
checking for sem_getvalue... yes
checking for sem_unlink... yes
checking for sendfile... yes
checking for setegid... yes
checking for seteuid... yes
checking for setgid... yes
checking for sethostname... yes
checking for setlocale... yes
checking for setregid... yes
checking for setreuid... yes
checking for setresuid... yes
checking for setresgid... yes
checking for setsid... yes
checking for setpgid... yes
checking for setpgrp... yes
checking for setpriority... yes
checking for setuid... yes
checking for setvbuf... yes
checking for sched_get_priority_max... yes
checking for sched_setaffinity... yes
checking for sched_setscheduler... yes
checking for sched_setparam... yes
checking for sched_rr_get_interval... yes
checking for sigaction... yes
checking for sigaltstack... yes
checking for sigfillset... yes
checking for siginterrupt... yes
checking for sigpending... yes
checking for sigrelse... yes
checking for sigtimedwait... yes
checking for sigwait... yes
checking for sigwaitinfo... yes
checking for snprintf... yes
checking for strftime... yes
checking for strlcpy... no
checking for strsignal... yes
checking for symlinkat... yes
checking for sync... yes
checking for sysconf... yes
checking for tcgetpgrp... yes
checking for tcsetpgrp... yes
checking for tempnam... yes
checking for timegm... yes
checking for times... yes
checking for tmpfile... yes
checking for tmpnam... yes
checking for tmpnam_r... yes
checking for truncate... yes
checking for uname... yes
checking for unlinkat... yes
checking for unsetenv... yes
checking for utimensat... yes
checking for utimes... yes
checking for waitid... yes
checking for waitpid... yes
checking for wait3... yes
checking for wait4... yes
checking for wcscoll... yes
checking for wcsftime... yes
checking for wcsxfrm... yes
checking for wmemcmp... yes
checking for writev... yes
checking for _getpty... no
checking for rtpSpawn... no
checking whether dirfd is declared... yes
checking for chroot... yes
checking for link... yes
checking for symlink... yes
checking for fchdir... yes
checking for fsync... yes
checking for fdatasync... yes
checking for epoll... yes
checking for epoll_create1... yes
checking for kqueue... no
checking for prlimit... yes
checking for memfd_create... no
checking for ctermid_r... no
checking for flock declaration... yes
checking for flock... yes
checking for getpagesize... yes
checking for broken unsetenv... no
checking for true... true
checking for inet_aton in -lc... yes
checking for chflags... no
checking for lchflags... no
checking for inflateCopy in -lz... yes
checking for hstrerror... yes
checking for inet_aton... yes
checking for inet_pton... yes
checking for setgroups... yes
checking for openpty... no
checking for openpty in -lutil... yes
checking for forkpty... yes
checking for fseek64... no
checking for fseeko... yes
checking for fstatvfs... yes
checking for ftell64... no
checking for ftello... yes
checking for statvfs... yes
checking for dup2... yes
checking for strdup... yes
checking for getpgrp... yes
checking for setpgrp... (cached) yes
checking for gettimeofday... yes
checking for library containing crypt... -lcrypt
checking for library containing crypt_r... none required
checking for crypt_r... yes
checking for clock_gettime... yes
checking for clock_getres... yes
checking for clock_settime... yes
checking for major... yes
checking for getaddrinfo... yes
checking getaddrinfo bug... no
checking for getnameinfo... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for struct stat.st_rdev... yes
checking for struct stat.st_blksize... yes
checking for struct stat.st_flags... no
checking for struct stat.st_gen... no
checking for struct stat.st_birthtime... no
checking for struct stat.st_blocks... yes
checking for struct passwd.pw_gecos... yes
checking for struct passwd.pw_passwd... yes
checking for siginfo_t.si_band... yes
checking for time.h that defines altzone... no
checking whether sys/select.h and sys/time.h may both be included... yes
checking for addrinfo... yes
checking for sockaddr_storage... yes
checking for sockaddr_alg... yes
checking whether char is unsigned... no
checking for an ANSI C-conforming const... yes
checking for working signed char... yes
checking for prototypes... yes
checking for variable length prototypes and stdarg.h... yes
checking for socketpair... yes
checking if sockaddr has sa_len member... no
checking for gethostbyname_r... yes
checking gethostbyname_r with 6 args... yes
checking for __fpu_control... yes
checking for --with-libm=STRING... default LIBM="-lm"
checking for --with-libc=STRING... default LIBC=""
checking for x64 gcc inline assembler... yes
checking whether float word ordering is bigendian... no
checking whether we can use gcc inline assembler to get and set x87 control word... yes
checking whether we can use gcc inline assembler to get and set mc68881 fpcr... no
checking for x87-style double rounding... no
checking for acosh... yes
checking for asinh... yes
checking for atanh... yes
checking for copysign... yes
checking for erf... yes
checking for erfc... yes
checking for expm1... yes
checking for finite... yes
checking for gamma... yes
checking for hypot... yes
checking for lgamma... yes
checking for log1p... yes
checking for log2... yes
checking for round... yes
checking for tgamma... yes
checking whether isinf is declared... yes
checking whether isnan is declared... yes
checking whether isfinite is declared... yes
checking whether POSIX semaphores are enabled... yes
checking for broken sem_getvalue... no
checking whether RTLD_LAZY is declared... yes
checking whether RTLD_NOW is declared... yes
checking whether RTLD_GLOBAL is declared... yes
checking whether RTLD_LOCAL is declared... yes
checking whether RTLD_NODELETE is declared... yes
checking whether RTLD_NOLOAD is declared... yes
checking whether RTLD_DEEPBIND is declared... yes
checking whether RTLD_MEMBER is declared... no
checking digit size for Python's longs... no value specified
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking size of wchar_t... 4
checking for UCS-4 tcl... no
checking whether wchar_t is signed... yes
checking whether wchar_t is usable... no
checking whether byte ordering is bigendian... no
checking ABIFLAGS...
checking SOABI... cpython-38-x86_64-linux-gnu
checking LDVERSION... $(VERSION)$(ABIFLAGS)
checking whether right shift extends the sign bit... yes
checking for getc_unlocked() and friends... yes
checking how to link readline libs... -lreadline
checking for rl_pre_input_hook in -lreadline... yes
checking for rl_completion_display_matches_hook in -lreadline... yes
checking for rl_resize_terminal in -lreadline... yes
checking for rl_completion_matches in -lreadline... yes
checking for append_history in -lreadline... yes
checking for broken nice()... no
checking for broken poll()... no
checking for working tzset()... yes
checking for tv_nsec in struct stat... yes
checking for tv_nsec2 in struct stat... no
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for term.h... yes
checking whether mvwdelch is an expression... yes
checking whether WINDOW has _flags... yes
checking for is_pad... yes
checking for is_term_resized... yes
checking for resize_term... yes
checking for resizeterm... yes
checking for immedok... yes
checking for syncok... yes
checking for wchgat... yes
checking for filter... yes
checking for has_key... yes
checking for typeahead... yes
checking for use_env... yes
configure: checking for device files
checking for /dev/ptmx... yes
checking for /dev/ptc... no
checking for %zd printf() format support... yes
checking for socklen_t... yes
checking for broken mbstowcs... no
checking for --with-computed-gotos... no value specified
checking whether gcc -pthread supports computed gotos... yes
checking for build directories... done
checking for -O2... yes
checking for glibc _FORTIFY_SOURCE/memmove bug... no
checking for gcc ipa-pure-const bug... no
checking for stdatomic.h... no
checking for GCC >= 4.7 __atomic builtins... yes
checking for ensurepip... upgrade
checking if the dirent structure of a d_type field... yes
checking for the Linux getrandom() syscall... yes
checking for the getrandom() function... no
checking for library containing shm_open... -lrt
checking for sys/mman.h... (cached) yes
checking for shm_open... yes
checking for shm_unlink... yes
checking for pkg-config... /usr/bin/pkg-config
checking whether compiling and linking against OpenSSL works... yes
checking for X509_VERIFY_PARAM_set1_host in libssl... yes
checking for --with-ssl-default-suites... python
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Misc/python.pc
config.status: creating Misc/python-embed.pc
config.status: creating Misc/python-config.sh
config.status: creating Modules/ld_so_aix
config.status: creating pyconfig.h
config.status: pyconfig.h is unchanged
creating Modules/Setup.local
creating Makefile
5、編譯安裝

切入到解壓目錄下

make && make install

..........
rm -f /usr/local/bin/pydoc3
(cd /usr/local/bin; ln -s pydoc3.8 pydoc3)
rm -f /usr/local/bin/2to3
(cd /usr/local/bin; ln -s 2to3-3.8 2to3)
if test "x" != "x" ; then \
        rm -f /usr/local/bin/python3-32; \
        (cd /usr/local/bin; ln -s python3.8-32 python3-32) \
fi
rm -f /usr/local/share/man/man1/python3.1
(cd /usr/local/share/man/man1; ln -s python3.8.1 python3.1)
if test "xupgrade" != "xno"  ; then \
        case upgrade in \
                upgrade) ensurepip="--upgrade" ;; \
                install|*) ensurepip="" ;; \
        esac; \
         ./python -E -m ensurepip \
                $ensurepip --root=/ ; \
fi
Looking in links: /tmp/tmplhwofxk0
Processing /tmp/tmplhwofxk0/setuptools-47.1.0-py3-none-any.whl
Processing /tmp/tmplhwofxk0/pip-20.1.1-py2.py3-none-any.whl
Installing collected packages: setuptools, pip
Successfully installed pip-20.1.1 setuptools-47.1.0

#至此編譯結束

6、配置軟連線
ln -s /usr/local/bin/python3 /usr/bin/python3

ps:因為在建立後有錯誤在,需要先刪除再建立

[root@kycxnode111 bin]# ln -s /usr/local/bin/python3 /usr/bin/python3
ln: 無法建立符號連結"/usr/bin/python3": 檔案已存在
[root@kycxnode111 bin]# rm -rf /usr/bin/python3
[root@kycxnode111 /]# which pip3
/usr/local/bin/pip3
[root@kycxnode111 /]# pip3 install selenium
Collecting selenium
  Downloading selenium-3.141.0-py2.py3-none-any.whl (904 kB)
     |████████████████████████████████| 904 kB 98 kB/s
Collecting urllib3
  Downloading urllib3-1.25.10-py2.py3-none-any.whl (127 kB)
     |████████████████████████████████| 127 kB 95 kB/s
Installing collected packages: urllib3, selenium
Successfully installed selenium-3.141.0 urllib3-1.25.10
[root@kycxnode111 /]# type pip3
pip3 已被雜湊 (/usr/local/bin/pip3)
[root@kycxnode111 /]# hash -r
[root@kycxnode111 /]# type pip3
pip3 是 /usr/local/bin/pip3
[root@kycxnode111 /]#

7、為pip3 建立軟連線

ln -s /usr/local/bin/pip3 /usr/bin/pip3

但是看上面的命令 軟連結並沒有起到作用,但是pip3 目前可以全域性正常使用,具體什麼原因導致的目前還暫無定論

至此 python3 和pip3 安裝成功