- Install from the Setup section
- macOS Dependencies
xcode-select --install brew install gettext openssl readline sqlite3 xz zlib tcl-tk # `--disable-ipv6` error # export PYTHON_CONFIGURE_OPTS="--disable-ipv6" # set compile flags for c++ and ld # pyenv doctor # CPPFLAGS="-I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib"
- WSL/Ubuntu Linux dependencies
# sudo -s apt update && apt install \ build-essential \ curl \ libbz2-dev \ libffi-dev \ liblzma-dev \ libncursesw5-dev \ libreadline-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ libxmlsec1-dev \ llvm \ make \ tk-dev \ wget \ xz-utils \ zlib1g-dev
- Fedora dependencies
sudo dnf install -y bzip2-devel libsqlite3x-devel
- All operating systems
# add python plugin asdf plugin-add python # install stable python asdf install python <latest> # 3.10.8 # uninstall version asdf uninstall python latest # refresh symlinks for installed python runtimes asdf reshim python # set working directory version (i.e., repo) asdf local python latest # set stable to system python asdf global python latest # optional: local python (e.g., python 3.9.10) cd $work_dir asdf list-all python 3.9 asdf install python 3.9.10 asdf local python 3.9.10 # verify python shim in use asdf current # check installed python asdf list python
No version set for command python
- Make sure
pythonorpython3isn't aliased in~/.bashrcor~/.zshrc
bash - Is it possible to check where an alias was defined? - Unix & Linux Stack Exchange
asdf,poetry, andpythonall need to be sourced in your shell$PATHin a specific orderasdfstores its Python shims in~/.asdf/shimspoetrylives in~/.local/binexport ASDF_DIR="$HOME/.asdf" export PATH="$ASDF_DIR/shims:$HOME/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
- Furthermore, any aliases or alias files need to be sourced as well
. "$ASDF_DIR/asdf.sh" . "$ASDF_DIR/completions/asdf.bash" . /usr/local/etc/profile.d/poetry.bash-completion