Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support #62

Closed
mcandre opened this issue Oct 6, 2013 · 31 comments
Closed

Windows support #62

mcandre opened this issue Oct 6, 2013 · 31 comments

Comments

@mcandre
Copy link

mcandre commented Oct 6, 2013

Could we port pyenv to Windows?

I imagine .bat scripts could mimic the behavior of the .sh scripts.


A note from the pyenv maintainers:

pyenv does not currently support Windows outside of the Windows Subsystem for Linux (WSL). We have no current plans to support Windows in the future.

@kirankotari has helpfully provided a port of pyenv for windows called pyenv-win, which hopefully will meet the needs of windows users.

@yyuu
Copy link
Contributor

yyuu commented Oct 7, 2013

I'm no longer using Windows. I don't like to waste my time with such thing.

@yyuu yyuu closed this as completed Oct 7, 2013
@mcandre
Copy link
Author

mcandre commented Oct 10, 2013

Windows isn't my favorite development platform either, but it's nice to be compatible for their benefit. There are development tools that aren't Unix compatible, and it's annoying to have to go back and forth between them. You end up with a build system that needs multiple operating systems just to build the application.

@CamiloMM
Copy link

As someone who is just in need of running Python but am clueless as how things are done in it, this StackOverflow answer makes it seem like it's now simple to have support for multiple pythons in Windows. I don't know if it's true but maybe this helps someone in my situation.

@mcandre
Copy link
Author

mcandre commented Jul 26, 2014

How granular does the Python Launcher support version numbers? Would #!python2.6.0 work, or just #!python2?

Can the Python Launcher parse the version in #!/usr/bin/env python[version] shebangs popular in Unix? It would stink to have to constantly change the shebangs back and forth between Unix and Windows.

@CamiloMM
Copy link

@mcandre fuck if I know. Python seems as easy to deploy on Windows as ksh scripts. Actually, one option is to port Python code to Objective-C to make it easier to deploy on Windows!

@ut-adamc
Copy link

I'm no longer using Windows. I don't like to waste my time with such thing.

Seems short-sighted to me, if you care about pyenv spreading. A lot of us work in places where we have to spend some of our time in Windows, and I'm more likely to prefer a tool I can use across environments than one that only runs in some of them.

I'm not a fan of Windows either, but the availability of things like virtualenvwrapper across environments has made it much easier for me to justify using them.

@ftomassetti
Copy link

I also do not use Windows but users of my open-source projects do, so it would be great to have support for pyenv on Windows. I would use it together to AppVeyor to test my software on Windows without having Windows

@chriskrycho
Copy link

As others have commented: Windows development may not be awesome, but a lot of us do use Windows for work because we have to (and some people just love it). I understand that you don't want to spend the time on it yourself, of course. Assuming someone could write Windows-friendly scripting, though, would you potentially accept PRs for it?

@autolife
Copy link

autolife commented Jun 4, 2015

you can try pywin[https://github.com/davidmarble/pywin]

@blueyed
Copy link
Contributor

blueyed commented Jun 5, 2015

Also anyenv might be an option: https://github.com/mislav/anyenv, assuming that Go on Windows works well.
Anyenv is supposed to be the successor of rbenv, pyenv etc.

@edbordin
Copy link

edbordin commented Aug 3, 2017

I'm interested in getting this working on Windows in my spare time. A couple of things I wouldn't mind feedback on though:

  1. pyenv install works by compiling python from source. Building python on Windows isn't actually too hard (I just built Python 3.6 with no issues). But getting a comprehensive set of build tools installed looks like a pain. To build all versions of python 2.x.x and 3.x.x you need VC++ 9.0, 10.0 and 14.0 and they all have their own fairly convoluted installation steps. So, perhaps an easier method would just be to download the official Windows builds. Is anyone heavily relying on adding custom build flags/patches etc. to their interpreter?

  2. Given how many bash scripts have been written, the easiest approach would probably be to patch pyenv so that it works in MSYS bash on Windows. I think this would still be useful, given that once an environment has been created it is relatively self-contained. Anyone see any obvious problems with this approach?

@blueyed
Copy link
Contributor

blueyed commented Aug 6, 2017

@edbordin
Maybe it is easier to look into https://github.com/mislav/anyenv for this? It has not been updated in a while, but was meant to replace rbenv/pyenv etc.

@edbordin
Copy link

@blueyed Yeah, I wasn't too sure about that project because (a) it seems inactive, and (b) it doesn't seem to implement the pyenv install command at all atm...

@slidenerd
Copy link

@yyuu i have a mac and windows machine and I would like to know how to run this on Windows since I use both for testing so that sorta comment s gonna get a lot of dislikes even on GitHub

@raiderrobert
Copy link

raiderrobert commented Feb 6, 2018

Came here to see if this ticket has possibly changed or had an update to it. Of course, I'm disappointed to not see it, but the tone in this thread is totally wrong.

The griping and down-thumbing you're doing here has been enough to drive other maintainers away from other projects. This vast majority of this project has been done by 5 people. And they've likely done so to solve their own particular problem, and now we all are benefiting from them doing the extra work of sharing it--this is not a light task.

I doubt any of them get paid to do this, and even if they are, they're not getting paid by you all. Just being a user doesn't entitle you to features much less one as huge as this.

So thanks maintainers! We really appreciate all that you do on this project for the community.

@edbordin
Copy link

edbordin commented Feb 6, 2018

@raiderrobert Most of the down-thumbing was on the original response to the feature request which quite frankly had an arrogant and dismissive tone. Of course the maintainers owe nothing to anybody, but if you address people in that manner you cannot reasonably expect zero backlash. Being generous doesn't give you unlimited license to be a jerk to everybody.

To me, the majority of the responses here have just been constructive feedback on why people would find this feature useful. Whether it is feasible given how much time the devs have is a totally different story - perhaps making that point would have a been a better way to close the issue.

Having said all that, I'd also like to thank the maintainers for a really useful tool.

@flying-sausages
Copy link

If you're still trying to find out how to get pyenv running on Windows, you might want to read up a little about the Windows Subsystem for Linux

@mcandre
Copy link
Author

mcandre commented Nov 16, 2018

the Windows Subsystem for Linux

Nope.

@Almenon
Copy link
Contributor

Almenon commented Jan 10, 2019

Unfortunately it looks like automatic switching of virtual environments offered by pyenv-virtualenv plugin is simply not possible with windows cmd :(

https://superuser.com/questions/933527/windows-run-script-on-cd

@cicorias
Copy link

work fine in WSL on Windows 10. So, I kinda agree, nothing to do here.

@Almenon
Copy link
Contributor

Almenon commented Jan 29, 2019

It didn't work on wsl for me @cicorias. How did you install it?

@cicorias
Copy link

I’ve been using Wlinux from the App Store. What distribution are you using and what errors? There probably missing packages that wlinux adds.

@pyenv pyenv deleted a comment from Almenon Feb 5, 2019
@kirankotari
Copy link

kirankotari commented Feb 11, 2019

On the inspiration of this thread I have ported pyenv for windows which contains basic features of pyenv.

Link: pyenv-win

I want to thanks following people in the thread. Who made me, to took a decision on porting for windows.
@mcandre @ftomassetti @chriskrycho @edbordin @raiderrobert

@skqr
Copy link

skqr commented Apr 28, 2019

@yyuu why would you close the issue? Even if you don't use Windows, a lot of the users of pyenv do. I do. Anybody else in the GitHub community could have contributed a PR with Windows support.

Please consider your users a bit more in the future.

And thank you @kirankotari for your port!

@joshfriend
Copy link
Member

Even if you don't use Windows, a lot of the users of pyenv do.

True, but I don't own, use, or have access to Windows PCs, and I think this is likely true of the other maintainers. rbenv and nodenv also lack Windows support outside WSL and have expressed resistance to add support as well.

Anybody else in the GitHub community could have contributed a PR with Windows support.

Absolutely, which is why we have pyenv-win now. Thanks to @kirankotari for that amazing contribution to the community 😄

Please consider your users a bit more in the future.

The earlier comments by @raiderrobert and @edbordin are spot on. I agree that the original reply to this issue was rude, but we aren't obligated to support windows just because people ask. I know that's disappointing for all of you windows users, but we just can't support it at this time.

I'll add a section to the top comment with a link to pyenv-win and this comment so that the status on windows support is more clear and visible in the future.

@altendky
Copy link
Contributor

Once pyenv-win is considered to be working well for many people it may be worth a mention in the readme even? But I do wonder how much there really is to share between the two what with them both trying to use native scripting languages which makes them inherently separate code even if they were to do similar things. I suppose maybe a lot of cli-level testing could be shared and would encourage them to retain similar interfaces?

joshfriend added a commit that referenced this issue Apr 29, 2019
@joshfriend
Copy link
Member

it may be worth a mention in the readme even?

Sure, I just added a note 👍

The idea for a shared "interface compatibility test suite" is great, I'm always in favor of more testing, I just don't have the time for that currently.

@edbordin
Copy link

@flying-sausages the main reason I couldn't use WSL for python was the lack of CUDA support, so having a native Windows option is great! On my current project I've giving Anaconda a try since they allow you to specify the interpreter version on all platforms and they also make things like numpy+mkl easier on Windows. The conda environment.yml doesn't quite have as many of the features I'd like compared to Pipenv+pyenv though (particularly, no lock files), so this new pyenv-win project is still nice to have as an option 😁

@kirankotari
Copy link

thanks guys for the support. @altendky thanks for bringing the point. My initial intention is to fork the pyevn itself to support windows, I love the pyenvs' the way today they are, but the differences I have encountered were massive changes which I am listing below. Help me to support as more features from pyenv to pyenv-win for windows, including testing.

  • Installation:- unlike linux and mac, we does not have zip/tar file for installation
  • Installation in background:- we does not have fully background installation for windows, trying a lot but due to policy of authentication minimum UI access is required. I have seen in most of the company laptops have this policy of authentication before installing. I am coming up with new ways to support complete background options for those doesn't have authentication policies i.e. personal laptops.
  • pip install support:- there was a slight difference on packaging to support via pip install, that's the reason you will see slight difference in packaging of pyenv and pyenv-win

Lot more feature yet to come. I have listed the new feature at pyenv-win/projects feel free to support or add more feature expectations in pyenv-win we will try our best to support them.

@lvxiaoxin
Copy link

Thanks @kirankotari and others who contributed to the pyenv-win project.

I just change developing work from Mac to Windows so I really need tools like this. I use it with virtualenv and this combination can handle many basic use of developing work. Thanks again!

@anurag-oss
Copy link

anurag-oss commented Jun 2, 2020

@flying-sausages the main reason I couldn't use WSL for python was the lack of CUDA support, so having a native Windows option is great! On my current project I've giving Anaconda a try since they allow you to specify the interpreter version on all platforms and they also make things like numpy+mkl easier on Windows. The conda environment.yml doesn't quite have as many of the features I'd like compared to Pipenv+pyenv though (particularly, no lock files), so this new pyenv-win project is still nice to have as an option 😁

@edbordin CUDA support is coming up in WSL2 as per the latest announcement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests