Python環境構築ログ
pyenv
code:install pyenv
$ sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
WARNING: seems you still have not added 'pyenv' to the load path.
# Load pyenv automatically by appending
# the following to
~/.bash_profile if it exists, otherwise ~/.profile (for login shells)
and ~/.bashrc (for interactive shells) :
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# Restart your shell for the changes to take effect.
# Load pyenv-virtualenv automatically by adding
# the following to ~/.bashrc:
eval "$(pyenv virtualenv-init -)"
$ vi ~/.bashrc
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
$ exec $SHELL
$ pyenv --version
pyenv 2.3.13
Available versions:
$ pyenv install -l
2.1.3
2.2.3
2.3.7
:
$ pyenv install 3.11.2
$ pyenv global 3.11.2
$ python -V
Python 3.11.2
参考URL
Poetry
code:poetry
$ poetry --version
Poetry (version 1.4.0)
$ poetry completions bash >> ~/.bash_completion
PDM
code:pdm
$ sudo apt install pipx
$ pipx install pdm
$ pdm config --global install.cache True
$ pdm completion bash | sudo tee /etc/bash_completion.d/pdm.bash-completion
参考URL