PyEnv: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
brew install pyenv
brew install pyenv
brew install pyenv-virtualenv
cat <<< '
cat <<< '
# pyenv config
# pyenv config
export PYENV_ROOT="${HOME}/.pyenv"
export PYENV_ROOT="${HOME}/.pyenv"
[[ -d ${PYENV_ROOT}/bin ]] && export PATH="${PYENV_ROOT}/bin:${PATH}"
[[ -d ${PYENV_ROOT}/bin ]] && export PATH="${PYENV_ROOT}/bin:${PATH}"
eval "$(pyenv init -)"'| tee -a ~/.bashrc >/dev/null
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"'| tee -a ~/.bashrc >/dev/null
</syntaxhighlight>
</syntaxhighlight>


Line 14: Line 16:
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 38:
|-
|-
| valign="top" |
| valign="top" |
<syntaxhighlight lang="bash">
cat ./.python-version
pyenv which python
pyenv which pip
</syntaxhighlight>
| valign="top" |
<syntaxhighlight lang="bash">
pyenv virtualenv 3.10.14 Powerline
pyenv activate Powerline
pyenv deactivate
</syntaxhighlight>
| valign="top" |
<syntaxhighlight lang="bash">
ls -lah ~/.pyenv/versions/3.10.14/envs/
ls -lah ~/.pyenv/versions/Powerline
ls -lah ~/.pyenv/versions
</syntaxhighlight>
|-
| colspan="3" |
----
|-
| valign="top" |
<syntaxhighlight lang="bash">
pyenv virtualenvs
pyenv versions
pyenv commands
</syntaxhighlight>


| valign="top" |
| valign="top" |
Line 47: Line 79:
| valign="top" |
| valign="top" |
* [https://pythonbiellagroup.it/en/learning/python_version/  PyEnv » Manage Multiple Python Versions]
* [https://pythonbiellagroup.it/en/learning/python_version/  PyEnv » Manage Multiple Python Versions]
* [https://stackoverflow.com/questions/30407446/ PyEnv »  Choose Virtualenv Directory]
* [https://joachim8675309.medium.com/managing-python-versions-with-pyenv-ddd7882eb39e PyEnv » Managing Python Versions]
* [https://joachim8675309.medium.com/managing-python-versions-with-pyenv-ddd7882eb39e PyEnv » Managing Python Versions]
* [https://github.com/pyenv/pyenv-virtualenv PyEnv » Plugins » <code>virtualenv</code>]
* [https://github.com/pyenv/pyenv-pip-migrate PyEnv » Plugins » <code>migrate</code>]
* [https://github.com/pyenv/pyenv-doctor PyEnv » Plugins » <code>doctor</code>]
* [https://github.com/pyenv/pyenv-update PyEnv » Plugins » <code>update</code>]
* [https://github.com/pyenv/pyenv PyEnv]
* [https://github.com/pyenv/pyenv PyEnv]


Line 60: Line 97:
| valign="top" |
| valign="top" |
* [https://serverfault.com/questions/283129/ SSH » Connection Hang Forever]
* [https://serverfault.com/questions/283129/ SSH » Connection Hang Forever]
* [[Python/Distribution]]
* [[Ruby on Rails]]
* [[Ruby on Rails]]
* [[TensorFlow]]
* [[Homebrew]]
* [[Homebrew]]
* [[Linuxbrew]]
* [[Linuxbrew]]
* [[Python2]]
* [[TMux]]
* [[TMux]]
* [[CURL]]
* [[CURL]]

Latest revision as of 10:01, 3 June 2024

brew install pyenv
brew install pyenv-virtualenv
cat <<< '
# pyenv config
export PYENV_ROOT="${HOME}/.pyenv"
[[ -d ${PYENV_ROOT}/bin ]] && export PATH="${PYENV_ROOT}/bin:${PATH}"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-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
pyenv virtualenv 3.10.14 Powerline
pyenv activate Powerline
pyenv deactivate
ls -lah ~/.pyenv/versions/3.10.14/envs/
ls -lah ~/.pyenv/versions/Powerline
ls -lah ~/.pyenv/versions

pyenv virtualenvs
pyenv versions
pyenv commands

References