python3.13.0 alpha 0版本源码编译:
环境——x86_64 ubuntu22.04系统:
1. 源码下载:
git clone https://github.com/python/cpython
2. 修改apt源地址:
编辑文件:
sudo vim /etc/apt/sources.list
添加内容:
deb-src http://archive.ubuntu.com/ubuntu/ jammy main
3. 安装依赖环境:
必选操作:
sudo apt-get build-dep python3 sudo apt-get install pkg-config
可选操作:
sudo apt-get install build-essential gdb lcov pkg-config \ libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \ libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \ lzma lzma-dev tk-dev uuid-dev zlib1g-dev
4. 正式编译:
./configure make make test sudo make install
建议设置路径为个人目录下,这里修改为 ./configure --prefix=/home/xxx/python3.13
===========================================
编译好后的效果:
标签:python3.13,sudo,dev,编译,源码,apt,alpha From: https://www.cnblogs.com/devilmaycry812839668/p/17604336.html