Skip to main content

pyenv lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.

Project description

# pyenv for Windows

The [pyenv][1] is a great tool. I ported it to Windows. Some commands doesn't implemented, but wouldn't be a problem in basic use.

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![GitHub issues open](https://img.shields.io/github/issues/pyenv-win/pyenv-win.svg?)](https://github.com/pyenv-win/pyenv-win/issues)

- [Introduction](#introduction)
- [pyenv](#pyenv)
- [pyenv-win does](#pyenv-win-does)
- [Installation](#installation)
- [How it works](#how-it-works)
- [FAQ](#faq)
- [How to contribute](#how-to-contribute)
- [Bug Tracker and Support](#bug-tracker-and-support)
- [License and Copyright](#license-and-copyright)
- [Author and Thanks](#author-and-thanks)

## Introduction

The [pyenv][1] for python is a great tool, but it doesn't supports windowns platform directly, which was the same case in [rbenv][2] for ruby developers. After a bit of research and feedbacks from python developers, they loves to have such a feature for windows systems.

I got inspired from the pyenv [issues][4] for windows support, personally I too use mac and linux with beautiful [pyenv][1], but in some companies they still use windows for there development. This library is to help windows users to manage multiple pythons.

Found a similar system for [rbenv-win][3] for ruby developers. This project was forked from [rbenv-win][3] and modified for [pyenv][1]. Some commands doesn't implemented, but wouldn't be a problem in basic use.

## pyenv

[pyenv][1] is a simple python version management tool. It lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.

## pyenv-win does

```yml
commands List all available pyenv commands
local Set or show the local application-specific Python version
global Set or show the global Python version
shell Set or show the shell-specific Python version
install Install a Python version using python-build
uninstall Uninstall a specific Python version
rehash Rehash pyenv shims (run this after installing executables)
version Show the current Python version and its origin
versions List all Python versions available to pyenv
exec Runs an executable by first preparing PATH so that the selected Python
```

## Installation

- **Installing by pip:** (To support existing python users)

1. For command prompt use following command `pip install pyenv-win --target %USERPROFILE%/.pyenv` (or)
For git bash or alternative use following command `pip install pyenv-win --target $HOME/.pyenv`
2. Add the following paths to your ENVIRONMENT PATH variable for accessing to pyenv command
`%USERPROFILE%\.pyenv\pyenv-win\bin;%USERPROFILE%\.pyenv\pyenv-win\shims;` at the begining
- __ENVIRONMENT PATH :: My Computer -> Propertires -> Advanced system settings -> Advanced -> Environment Variables -> PATH__
3. Open command prompt (new session) and type `pyenv --version`
4. You need to see current pyenv version. If you are getting an error go through the steps again still facing the issue [open a ticket](https://github.com/pyenv-win/pyenv-win/issues).
5. Type `pyenv` to see list of commands it support. [More..](#how-it-works)

Installation is done hurray...!

- **Installing by downloading zip file:**

1. Link: [pyenv-win](https://github.com/pyenv-win/pyenv-win/archive/master.zip)
2. Extract to your `%USERPROFILE%/.pyenv/pyenv-win`
3. Add the following paths to your ENVIRONMENT PATH variable for accessing to pyenv command
`%USERPROFILE%\.pyenv\pyenv-win\bin;%USERPROFILE%\.pyenv\pyenv-win\shims;` at the begining
- __ENVIRONMENT PATH :: My Computer -> Propertires -> Advanced system settings -> Advanced -> Environment Variables -> PATH__

4. Open command prompt (new session) and type `pyenv --version`
5. You need to see current pyenv version. If you are getting an error go through the steps again still facing the issue [open a ticket](https://github.com/pyenv-win/pyenv-win/issues).
6. Type `pyenv` to see list of commands it support. [More..](#how-it-works)

Installation is done hurray...!

- **Installing by git:**

1. Clone the repository to the user profile
`git clone https://github.com/pyenv-win/pyenv-win.git %USERPROFILE%/.pyenv/pyenv-win`
2. Add the following paths to your ENVIRONMENT PATH variable for accessing to pyenv command
`%USERPROFILE%\.pyenv\pyenv-win\bin;%USERPROFILE%\.pyenv\pyenv-win\shims;` at the begining
- __ENVIRONMENT PATH :: My Computer -> Propertires -> Advanced system settings -> Advanced -> Environment Variables -> PATH__

3. Open command prompt (new session) and type `pyenv --version`
4. You need to see current pyenv version. If you are getting an error go through the steps again still facing the issue [open a ticket](https://github.com/pyenv-win/pyenv-win/issues).
5. Type `pyenv` to see list of commands it support. [More..](#how-it-works)

Installation is done hurray...!

## How it works

- To view list of python versions supported by pyenv windows. `pyenv install -l`
- To install python version. `pyenv install 3.5.2` _Note: older version of python is msi file just click on next to install (no need of changing any options it in)_
- To set a python version as global version. `pyenv global 3.5.2` _Note: version needs to be installed_
- To set a python version as local version. `pyenv local 3.5.2` you can give any version which you wanted to use to the project, this will be auto activated by entering to the folder not like other virtual env. to activate.
- To uninstall any python version. `pyenv uninstall 3.5.2`
- To know which python you are using and it's path `pyenv version`
- To view all the python versions installed in this system `pyenv versions`

## FAQ

- **Question:** Does pyenv for windows support python2?
**Answer:** Yes, We are supporting python2 from the version 2.0.1. We are supporting from 2.0.1 until the python.org officially removes.

- **Question:** Does pyenv for windows support python3?
**Answer:** Yes, we are supporting python3 from the version 3.0. We are supporting from 3.0 until the python.org officially removes.

## How to contribute

- Fork the project & clone locally.
- Create an upstream remote and sync your local copy before you branch.
- Branch for each separate piece of work. It's a good practise to write test cases.
- Do the work, write good commit messages, and read the CONTRIBUTING file if there is one.
- Test the changes by running `tests\test_install.bat` and `tests\test_uninstall.bat`
- Push to your origin repository.
- Create a new Pull Request in GitHub.

## Bug Tracker and Support

- Please report any suggestions, bug reports, or annoyances with pyenv-win through the [Github bug tracker](https://github.com/pyenv-win/pyenv-win/issues).

## License and Copyright

- pyenv-win is licensed under [MIT](http://opensource.org/licenses/mit-license.php) *2019*

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Author and Thanks

pyenv-win was developed by [Kiran Kumar Kotari](https://github.com/kirankotari)

[1]: https://github.com/pyenv/pyenv
[2]: https://github.com/rbenv/rbenv
[3]: https://github.com/nak1114/rbenv-win
[4]: https://github.com/pyenv/pyenv/issues/62


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyenv-win-1.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

pyenv_win-1.0.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pyenv-win-1.0.1.tar.gz.

File metadata

  • Download URL: pyenv-win-1.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.5.6

File hashes

Hashes for pyenv-win-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f971464482dcc5e51fc74a52e8b509eb3f9b8a05713261e3a9f23fef80e707d0
MD5 c08b0a3f2d6c4cc445c60f0a0278d013
BLAKE2b-256 b82fead0495fb2ece423b9b70310f4e3c9efcde600213e2ec41e0ffd5849e99c

See more details on using hashes here.

File details

Details for the file pyenv_win-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyenv_win-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.5.6

File hashes

Hashes for pyenv_win-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2bc7867819b47b4daa6ffb386258f31b91a0d71404c13f581480a38b412650bc
MD5 f926e8513c49b7271d185af728bb3669
BLAKE2b-256 9e22f0076f1749cdc316755d4bbb54521725e6343fa141f2992349705362d64b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page