![download python 2.7.9 for unix download python 2.7.9 for unix](https://image.slidesharecdn.com/qtpilxz6r4qqtzsgvgwa-signature-8ca531426c8bbe96d0bdb1c51ee46dbab6e4f30f9dde37dccf1b8449298eef22-poli-171120103017/95/christian-strappazzon-presentazione-python-milano-codemotion-milano-2017-10-638.jpg)
This list of directories lives in an environment variable called PATH, with each directory in the list separated by a colon: /usr/local/bin:/usr/bin:/binĭirectories in PATH are searched from left to right, so a matching executable in a directory at the beginning of the list takes precedence over another one at the end. When you run a command like python or pip, your operating system searches through a list of directories to find an executable file with that name. Of course, you can create virtualenv yourself, or pyenv-virtualenv to automate the process.Īt a high level, pyenv intercepts Python commands using shim executables injected into your PATH, determines which Python version has been specified by your application, and passes your commands along to the correct Python installation.
![download python 2.7.9 for unix download python 2.7.9 for unix](https://i.stack.imgur.com/AIUqg.png)
Instead, pyenv's shim approach works by adding a directory to your $PATH. In contrast with pythonbrew and pythonz, pyenv does not.
![download python 2.7.9 for unix download python 2.7.9 for unix](https://i.stack.imgur.com/DfxYP.jpg)
This may be helpful to test across Python versions with tox. Search commands from multiple versions of Python at a time.Allow you to override the Python version with an environment variable.Provide support for per-project Python versions.Let you change the global Python version on a per-user basis.This project was forked from rbenv and ruby-build, and modified for Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well. Pyenv lets you easily switch between multiple versions of Python.