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? #30
Comments
I'd like it to support Windows. The code already checks if it's running under windows and adds the ".exe" suffix in some places, but I haven't tested it. Based on on your comment it almost certainly does not work :). It shouldn't be very hard to modify the code to copy instead of symlink for the Windows platform. I can modify the code to do this, but would have to rely on others testing it. If someone would like to modify the code and test it, that would be fine too. Are you interested in helping with this? Is there anything else that needs to be done? Checks for some kind of .bat file extensions maybe? |
btw thank you for the work you've done on pipsi |
In theory, I'd be interested in seeing this happen, but to be honest, I'm currently using (and poking round in the internals of) about four different tools for bundling Python apps, as well as writing one of my own, off and on, so I think I'd be stretched too thin to commit to helping here right now! But I will add this project to the list of ones I'm playing round with, and if I do come up with anything that might be helpful, I'll submit a PR or issue. Your approach looks nice. Glad the changes I contributed to pipsi were of use to you :-) |
I just added support for Windows but am not able to test it. If you are a Windows user and have tried to use |
I should be able to test this evening on a Windows 10 VM if no one else has a chance to test before then. |
I did a quick test and got an error about Which does actually beg the question - what is the intended installation method for someone who doesn't want to install applications into their system Python installation? |
Editing yet again to not clutter thread and remove old information - There are a couple parts to the issue:
|
Thanks @sahensley! You're right, I forgot to update
How annoying. Why would WindowsPath be different than Path? Anyway, I guess what I should do is something like
prior to running any commands. |
It works fine from a virtualenv if you do
Are you referring to installations into |
Ignore me. I was misunderstanding how
It's not. But |
It looks like the WindowsPath not being iterable is a The next "fun" thing I could see coming up with the string conversion is Windows paths triggering unicode escaping. |
Why do you say that? The referenced discussion is a simple error by someone not correctly quoting a string containing backslashes. There's plenty of fun you can have with encodings on Windows (because naive assumptions about what encoding to use don't always apply, you really do need to know what you're doing) but this doesn't seem like it's one of them :-) |
@sahensley @pfmoore I updated master with a fix for get-pipx and when running as a subprocess. Let me know how it goes. in get-pipx.py
in main.py and get-pipx.py
|
btw the best way to test |
Here are the results from running the newest get-pipx.py installer with Python 3.6.7.
When this happens, it creates a C:\Users\username\.local\bin directory and a virtualenv at C:\Users\username\.local\pipx\venvs\pipx. If the installer script is run again, it will exit with the message You already have pipx installed. Type pipx to run. until the .local directories are removed. |
You should run pip as The pip error message says this (although it's a bit buried under the rest of the output):
|
I updated to use Thanks for all the help with this, I think we're getting close. |
We are certainly close! It looks like the binary check and some WindowsPath issues are still creeping up. Here's the issues I've noticed:
get-pipx.py output
pipx install black output
|
Once again thank you. Your summaries help me in making the fixes faster, much appreciated. Just pushed an update to master. lmk how it goes. |
Glad to help! Windows support is quite the undertaking (especially since you are writing it without a machine to test on) and I think it could really be the "killer feature" of the app. get-pipx.pyThe install is so close now. The The PATH modification notes in the post-install output will need to be updated for Windows. I'd be glad to update the docs once we wrangle this beast. C:\Users\username\.local\bin has a Running pipx.exe via full pathThe path strings will need "doubled backslashes" (i.e. C:\\Users\\bob) for escaping on subcommands such as list or install. pipx list --verbose
|
The boxes are because you're using a font that doesn't include the emoji. The console (and Python 3.6+) supports UTF-8 by default, the shell you're using isn't relevant. But beware, if you pipe output to a file or another process, the encoding of sys.stdout changes (to the user's defined 8-bit codepage).So you should test that See linkedin/shiv#82 for something similar. |
Without interactively debugging that last one myself on a windows computer I don’t know if I’ll be able to fix it. I will have to get ahold of one. I agree that windows support is important. I see it as the last big piece that needs to fall into place before I start trying to get it to be seen as the “right way” to install global binaries, at least for my projects. |
…indows; update instructions for windows (#30)
I tried to set up a Docker image and sort of got it working but then ran into some path issues, so I gave up and got ahold of a Window's laptop. I got it working there and updated master to v0.9. LMK how it works on your machines. I would not be surprised if there are a few more surprises left 😆but I'm hopeful I got it working for the majority of cases. |
Awesome!! I did all my testing with the Testing results:
Here's the uninstall-all error:
Keep up the awesome work! 🎉 |
Cool thanks.
Fixes are in v0.9.2 and published to |
This issue is getting really large with all the comments. Since windows works in 0.9.2 I am going to close it so we can work new any new bugs in dedicated issues. Thank you both for helping me out here! |
It's not clear from the docs if pipx supports Windows, but given that it relies on symlinks, I assume not? (Symlinks typically require extra privileges on Windows, that the average user doesn't have). Are there plans to support Windows?
The text was updated successfully, but these errors were encountered: