python3.12.2银河麒麟v10鲲鹏离线快速部署
背景
清明假期忙活了一整天发现自己方向走错了.
部署效率巨慢无比.
其实简单情况下很快就可以弄好.
自己最开始使用 python3.9 使用的是libressl
发现最新版已经不需要了.并且使用仓库中的就可以.
系统版本说明
公司的银河麒麟v10 On ARM 有两个版本
第一个:
############## Kylin Linux Version #################
Release:
Kylin Linux Advanced Server release V10 (Tercel)
Kernel:
4.19.90-17.ky10.aarch64
Build:
Kylin Linux Advanced Server
release V10 (SP1) /(Tercel)-aarch64-Build04/20200711
#################################################
第二个
############## Kylin Linux Version #################
Release:
Kylin Linux Advanced Server release V10 (Lance)
Kernel:
4.19.90-52.15.v2207.ky10.aarch64
Build:
Kylin Linux Advanced Server
release V10 (SP3) /(Lance)-aarch64-Build20/20221125
#################################################
建议选用第二个.
安装必备的包
yum install libffi-devel tcl-devel tk-devel perl-CPAN openssl-devel readline-devel sqlite-devel openssl -y
yum groups install "Development Tools" -y
解压缩直接编译就可以
./configure --prefix=/opt/python3 --enable-optimizations
确认版本以及pip处理
/opt/python3/bin/python3 -V
Python 3.12.2
增加境内源:
mkdir -p ~/.pip
cat > ~/.pip/pip.conf <<EOF
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn
EOF
升级一下
/opt/python3/bin/python3 -m pip install --upgrade pip
注意确认一下 安装 pip包之前 大小 399M
安装后续的包:
/opt/python3/bin/pip3 install async-generator attrs bcrypt certifi cffi \
charset-normalizer cryptography ddt et-xmlfile h11 idna jdcal Mako \
MarkupSafe numpy opencv-python openpyxl outcome pandas paramiko \
Pillow PyAutoIt pycparser PyNaCl pyOpenSSL python-dateutil \
pytz PyYAML requests selenium setuptools six sniffio sortedcontainers \
trio trio-websocket urllib3 wsproto xlrd xlwt
安装完后: 759MB
增加了 360MB的大小.
/opt/python3/bin/pip3 install psycopg2
注意最后一个可能会报错
安装的pip包的列表为:
/opt/python3/bin/pip3 list
Package Version
------------------ -----------
async-generator 1.10
attrs 23.2.0
bcrypt 4.1.2
certifi 2024.2.2
cffi 1.16.0
charset-normalizer 3.3.2
cryptography 42.0.5
ddt 1.7.2
et-xmlfile 1.1.0
h11 0.14.0
idna 3.6
jdcal 1.4.1
Mako 1.3.2
MarkupSafe 2.1.5
numpy 1.26.4
opencv-python 4.9.0.80
openpyxl 3.1.2
outcome 1.3.0.post0
pandas 2.2.1
paramiko 3.4.0
pillow 10.3.0
pip 24.0
psycopg2 2.9.9
PyAutoIt 0.6.5
pycparser 2.22
PyNaCl 1.5.0
pyOpenSSL 24.1.0
PySocks 1.7.1
python-dateutil 2.9.0.post0
pytz 2024.1
PyYAML 6.0.1
requests 2.31.0
selenium 4.19.0
setuptools 69.2.0
six 1.16.0
sniffio 1.3.1
sortedcontainers 2.4.0
trio 0.25.0
trio-websocket 0.11.1
typing_extensions 4.10.0
tzdata 2024.1
urllib3 2.2.1
wsproto 1.2.0
xlrd 2.0.1
xlwt 1.3.0
打包备用
tar -czvf python3.12.2_aach64.tar.gz python3
标签:python3.12,Kylin,v10,离线,devel,Linux,pip,python3
From: https://www.cnblogs.com/jinanxiaolaohu/p/18115469