linux 环境搭建 python3

https://links.jianshu.com/go?spm=a2c6h.12873639.article-detail.7.1fcd4c11oHKCOu&to=https%3A%2F%2Fwww.python.org%2Fftp%2Fpython%2F3.9.13%2FPython-3.9.13.tgz

tar -zxvf Python-3.9.13.tgz
cd Python-3.9.13
./configure --prefix=/usr/local/python39

yum install -y zlib-devel zlib openssl-devel libffi-devel
-- 安装 openstack 时需要:libffi-devel

make clean && make install

修改环境变量文件:
vim /etc/profile
PATH=${PATH}:/usr/local/python39/bin/
source /etc/profile

python3

[root@ans Python-3.9.13]# python3
Python 3.9.13 (main, Jan  3 2024, 14:23:34) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
>>> 

Reference:

问题1:找不到 _ssl 模块
解决方案:
编辑:Python-3.9.13/Modules/Setup 文件

centos 7 上安装部署TFTP服务器

yum install xinetd tftp tftp-server

cp /etc/xinetd.d/tftp{,.bak}
vi /etc/xinetd.d/tftp

server_args = -s /var/lib/tftpboot -c # 注意这行,如果允许上传,一定要加上参数 -c
disable = no # 这行默认为yes,改成no,允许

systemctl restart xinetd.service
systemctl enable xinetd.service

netstat -ntlup |grep 69
netstat -a |grep tftp

chmod 0777 /var/lib/tftpboot

systemctl stop firewalld
iptables -A INPUT -p udp --dprot 69 -j ACCEPT

https://www.cnblogs.com/rysj/p/9173433.html

https://zhiliao.h3c.com/questions/dispcont/183063

https://blog.csdn.net/wq298102526/article/details/108796824

posted @ 2024-01-03 20:00  LIANG2023  阅读(2)  评论(0)    收藏  举报