参照サイト
https://invisiblepotato.com/ubuntu01/
https://self-development.info/ubuntu%E3%81%AB%E6%9C%80%E6%96%B0%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%AEpython%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B/
https://www.python.jp/install/ubuntu/index.html
https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-22-04
Pythonをインストールする
ビルドツール・ライブラリのインストールする
$ sudo apt update
$ sudo apt install build-essential libbz2-dev libdb-dev \
libreadline-dev libffi-dev libgdbm-dev liblzma-dev \
libncursesw5-dev libsqlite3-dev libssl-dev \
zlib1g-dev uuid-dev tk-dev
ソースコードをダウンロードする

ソースコードの展開・ビルドする
tar xJf Python-3.x.y.tar.xz
cd Python3.x.y
./configure --prefix=/home/user/.local/python
make
make install
--prefixを指定しないと/usr/local/にインストールされる
VSCodeをインストールする
debをダウンロードする

debをインストールする


VSCodeを設定する
日本語化する
初回起動時に日本語環境をインストールするか訊かれるのでインストールする
VSCode用Python拡張機能をインストールする

コンパイラを指定する

/home/user/.local/python/bin/Python3.x
pythonを実行する
helloWorld.pyを生成

コードを書く
helloWorld.py
print("Hello World")
実行する

無事HelloWorld!が表示された