<aside>

推荐使用pyenvhttps://github.com/pyenv/pyenv配合venv安装并管理本地多版本 Python:

curl -fsSL <https://pyenv.run> | bash
sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \\
libbz2-dev libreadline-dev libsqlite3-dev curl git \\
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev

Usage 用法:https://github.com/pyenv/pyenv?tab=readme-ov-file#usage

</aside>


pip install -r requirements
pip install --upgrade psycopg2==2.9.9 psycopg2-binary==2.9.9

pip-tools

适合大型项目


Upgrade Python to latest version (3.12) on Ubuntu Linux or WSL2