python3.10版本需要openssl1.1.1及以上版本
参考链接:https://blog.csdn.net/weixin_42806458/article/details/110678710
bash
wget https://www.openssl.org/source/openssl-1.1.1q.tar.gz
unzip openssl-1.1.1q.tar.gz
cd openssl-1.1.1q
./config --prefix=/usr/local/openssl --openssldir=/etc/ssl shared zlib
make && make install
echo "/usr/local/openssl/lib" >>/etc/ld.so.conf
#下面这个命令未确定是否必要
echo "/usr/local/lib64/" >> /etc/ld.so.conf
ldconfig -v
openssl version -a
python3.10.14安装
bash
cd Python-3.10.14/
./configure --enable-optimizations --with-openssl=/usr/local/openssl --with-openssl-rpath=auto
make && make altinstall
报错:ModuleNotFoundError: No module named '_ctypes'
解决办法:yum install libffi-devel
报错:ModuleNotFoundError: No module named 'dingtalk.api'
解决办法:参考链接https://developer.aliyun.com/article/864562
bash
#dingtalk.zip是解压后的文件中的一个名为dingtalk的文件夹加压后的文件
mv dingtalk.zip /usr/local/lib/python3.10/site-packages/
错误:执行钉钉触发构建python程序时报错Arguments: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)
解决办法:参考链接https://opensource.dingtalk.com/developerpedia/docs/develop/best-practices/python-ssl/
bash
export SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt