紫鼠小窝 - python
type: channel
link: https://www.puguying.cn/tag/python/
items: 安装python3

安装python3
type: item
date: 2023-01-01T00:44:00+08:00
description: 安装python3更新源sudo apt update && sudo apt upgrade安装依赖sudo apt install wget build-essential libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev下载源码cd ~ wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz解压源码tar xzf Python-3.10.0.tgz编译源码cd Python-3.10.0 ./configure --enable-optimizations安装make altinstall软连接sudo ln -s /usr/local/bin/python3.10 /usr/bin/python3 sudo ln -s /usr/local/bin/pip3.10 /usr/bin/pip3