$ sudo apt install libreadline-gplv2-dev libncursesw5-dev libsqlite3-dev tk-dev libgdbm-dev libgdbm-compat-dev \ libbz2-dev libssl-dev libsqlite3-dev libffi-dev liblzma-dev
make したときに、依存ライブラリが不足しているエラーが出てきたら適宜依存(のソース)を追加する
apt search xxxx | grep dev
とかで探す
$ git clone git@github.com:python/cpython.git -b 3.10 $ cd cpython $ git branch * 3.10 $ ./configure --enable-optimizations $ make -j$(nproc) $ sudo make altinstall $ sudo ldconfig -v $ python3.10 --version Python 3.10.2+
よか
$ cd ${POETRY_PROJECT} $ poetry env use python3.10
home = /usr/local implementation = CPython version_info = 3.10.2.final.0 virtualenv = 20.8.1 include-system-site-packages = false base-prefix = /usr/local base-exec-prefix = /usr/local base-executable = /usr/local/bin/python3.10