Skip to content

pyenv for Windows. pyenv 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.

License

Notifications You must be signed in to change notification settings

inseopark/pyenv-win

 
 

Repository files navigation

pyenv for Windows using shim

Based on pyenv , and pyenv-win, I foked more simplified but adding build from source capabilities. Generic use case is Poetry + Visual Source Code + Windows Console developers.

Basic functionality:

  • Install python using nuget package : no registry changes required, installing old version with new version installed is possible
  • Build from source is possible
  • shim is borrowed from scoop project, but modified to support directory based .python-version

License: MIT GitHub issues open

Introduction

pyenv for python is a great tool but, like rbenv for ruby developers, it doesn't support Windows directly. After a bit of research and feedback from python developers, I discovered they wanted a similiar feature for Windows systems.

I got inspired from the pyenv [issue][4] for Windows support. Personally, I use Mac and Linux with beautiful pyenv, but some companies still use Windows for development. This library is to help Windows users manage multiple python versions.

I found a similar system for rbenv-win for ruby developers. This project was forked from rbenv-win and modified for pyenv. Some command aren't implemented, but it's good enough for basic use.

pyenv

pyenv 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 commands

   commands    List all available pyenv commands (* not yet implemented)
   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 (* not yet implemented required?)
   install     Install a Python version using python-build
   uninstall   Uninstall a specific Python version (*not yet implemented)
   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 (not yet implemented)

Installation

Get pyshim-win

Get pyenv-win via one of the following methods. (Note: examples are in command prompt. For Powershell, replace %USERPROFILE% with $env:USERPROFILE. For Git Bash, replace with $HOME.)

  • With Git
    • git clone https://github.com/inseopark/pyshim-win.git %USERPROFILE%/.pyenv

Finish the installation

  1. Add a new variable under System variables in ENVIRONMENT with name:
    PYENV_ROOT value: %USERPROFILE%\.pyenv
  2. Now add the following paths to your ENVIRONMENT PATH variable in order to access the pyenv command (don't forget to separate with semicolons):
    • %PYENV_ROOT%\bin
    • %PYENV_ROOT%\shims
    • ENVIRONMENT PATH :: This PC -> Properties -> Advanced system settings -> Advanced -> Environment Variables... -> PATH
    • Be careful! People who uses Windows (>= May 2019 Update) must put these items above %USERPROFILE%\AppData\Local\Microsoft\WindowsApps; See this article.
  3. Verify the installation was successful by opening a new terminal and running pyshim --version
  4. Install any python version and make global
    • pyshim install 3.8.2
    • pyshim global 3.8.2
  5. If you need specific python version for specific directory, change into directory and specify local version
    • cd /d {some where}
    • pyshim local 3.7.7
    • pyshim version
    • 3.7.7 (set by C:\Apps\pyshim-win.git\version)
  6. Run pyshim to see list of commands it supports. More info...

Installation is done. Hurray!

Usage

To be updated

How to get updates

To be updated

FAQ

  • Question: Does pyshim-env (fork of pyenv-win) support python2?

    • Answer: No, only python 3 supported
  • Question: Is there any limitation to build from source ?

    • Answer: Python version >= 3.6.3 supported.

To be updated

How to contribute

  • To be updated

Bug Tracker and Support

  • Please report any suggestions, bug reports, or annoyances with pyshim-win through the GitHub bug tracker.

License and Copyright

  • pyenv-win is licensed under MIT 2019

    License: MIT

Author and Thanks

pyshim-win is inseopark 's forked trial. original idea derived from : pyenv-win was developed by Kiran Kumar Kotari and Contributors

About

pyenv for Windows. pyenv 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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 90.0%
  • Batchfile 9.1%
  • Python 0.9%