Pyenv: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
* https://github.com/pyenv/pyenv
* https://github.com/pyenv/pyenv
=Internal=
=Internal=
* [[Python_Versions#Python_Version_Management_with_pyenv|Python Versions]]
* [[Python Package Managers]]
* [[Python Package Managers]]
=Overview=
<code>pyenv</code> is a tool that let you switch between multiple version of Python.


<code>pyenv</code> lets you change the global Python version on a per-user basis. It also provides support for per-project Python versions. It allows you to override the Python version with an environment variables.
=Subjects=
 
* [[pyenv Concepts|Concepts]]
<code>pyenv</code> works by intercepting Python commands using shim executables injected in <code>PATH</code>, determines which Python version has been specified by your application and passes the command along to the correct Python installation.
* [[pyenv Operatons|Operatons]]
 
=Version Selection=
 
The intercepting <code>pyenv</code>  shim determines what Python version is needed by looking at the following sources, in this order:
# <CODE>PYENV_VERSION</CODE>
# The application-specific <code>.python-version</code> in the current directory. 
# The first <code>.python-version</code> file found by searching each parent directory up to the filesystem root.
# The global <code>$(pyenv root)/version</code> file.

Latest revision as of 00:30, 3 November 2023