PyEnv: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 14: Line 14:
pyenv install -list-all
pyenv install -list-all
pyenv install 3.10.14
pyenv install 3.10.14
cat ./.python-version
pyenv rehash
</syntaxhighlight>
</syntaxhighlight>


Line 36: Line 36:
|-
|-
| valign="top" |
| valign="top" |
<syntaxhighlight lang="bash">
cat ./.python-version
pyenv which python
pyenv which pip
</syntaxhighlight>


| valign="top" |
| valign="top" |

Revision as of 09:45, 2 June 2024

brew install pyenv
cat <<< '
# pyenv config
export PYENV_ROOT="${HOME}/.pyenv"
[[ -d ${PYENV_ROOT}/bin ]] && export PATH="${PYENV_ROOT}/bin:${PATH}"
eval "$(pyenv init -)"'| tee -a ~/.bashrc >/dev/null

Playground

pyenv install -list-all
pyenv install 3.10.14
pyenv rehash
pyenv global system 3.10.14
pyenv global 3.10.14
pyenv global
pyenv shell 3.10.14
pyenv shell system
python -V

cat ./.python-version
pyenv which python
pyenv which pip

References