https://github.com/pyenv/pyenv-installer
This tool is used to install `pyenv` and friends.
https://github.com/pyenv/pyenv-installer
Last synced: 6 months ago
JSON representation
This tool is used to install `pyenv` and friends.
- Host: GitHub
- URL: https://github.com/pyenv/pyenv-installer
- Owner: pyenv
- License: mit
- Created: 2013-06-01T03:48:07.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2025-04-24T19:06:44.000Z (7 months ago)
- Last Synced: 2025-05-11T00:25:23.045Z (7 months ago)
- Language: Shell
- Homepage:
- Size: 268 KB
- Stars: 4,041
- Watchers: 74
- Forks: 451
- Open Issues: 7
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- support-awesome-foss - Install-Link
- best-of-python-dev - GitHub - 9% open · ⏱️ 05.09.2025): (Virtual Environments)
- awesome-starred - pyenv/pyenv-installer - This tool is used to install `pyenv` and friends. (others)
README
pyenv installer
===============
This tool installs `pyenv `__ and friends. It is inspired by `rbenv-installer `__.
Prerequisites
----
`Git `__ installed.
In general, compiling your own Python interpreter requires the installation of the
appropriate libraries and packages. The `installation wiki
`__ provides a list of these for common
operating systems.
Installation / Update / Uninstallation
--------------------------------------
Once prerequisites have been installed correctly:
Install:
~~~~
If you wish to install a specific release of Pyenv rather than the latest head, set the ``PYENV_GIT_TAG`` environment variable (e.g. ``export PYENV_GIT_TAG=v2.2.5``).
.. code:: bash
curl https://pyenv.run | bash
``pyenv.run`` redirects to the install script in this repository and the invocation above is equivalent to::
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
After installing, follow `these instructions `_ to set up your shell environment.
You can now begin using pyenv.
If you need, ``export USE_SSH`` to use ``git@github.com``(SSH pseudo-URL) instead of ``https://`` for git clone. (Need to have `ssh` installled.)
Update:
~~~~
.. code:: bash
pyenv update
Uninstall:
~~~~
``pyenv`` is installed within ``$PYENV_ROOT``
(default: ``~/.pyenv``). To uninstall, just remove it:
.. code:: bash
rm -fr ~/.pyenv
then remove these three lines from ``.bashrc``:
.. code:: bash
export PATH="HOME/.pyenv/bin:HOME/.pyenv/bin:PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
and finally, restart your shell:
.. code:: bash
exec $SHELL
Using pyenv-installer on Travis CI
----------------------------------
Travis itself uses pyenv and therefore ``PYENV_ROOT`` is set already. To make it work anyway the installation for pyenv-installer needs to look like this::
[...]
- unset PYENV_ROOT
- curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
- export PATH="$HOME/.pyenv/bin:$PATH"
- pyenv install 3.5.2
Development and testing
-----------------------
The `project on github `__ contains
a setup for vagrant to test the installer inside a vagrant managed virtual image.
If you don't know vagrant yet: just `install the latest
package `__, open a shell in
this project directory and say
::
vagrant up
vagrant ssh
Now you are inside the vagrant container and your prompt should like
something like ``vagrant@vagrant-ubuntu-trusty-64:~$``
The project (this repository) is mapped into the vagrant image at
/vagrant
.. code:: bash
cd /vagrant
python setup.py install
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
source ~/.bashrc
Pyenv should be installed and responding now.
Version History
---------------
20190111
~~~~~~~~
- Remove experimental PyPi support and replace with a dummy package.
20150113
~~~~~~~~
- Initial release on PyPi.
20130601
~~~~~~~~
- Initial public release.
License
-------
MIT - see `License file `_.