-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Installing packages fails if Python 3 installed into path with non-ASCII characters #4984
Comments
Thanks for the report - this is a known issue, fixed in the development version, and the fix will be released in pip 10. |
Great! Encountering this in the first training where I used Python 3 was a flashback from #3463 that my earlier students encountered. Apparently non-ASCII stuff is still hard also in the shiny Python 3 world. =) |
Ah yes, I thought your name seemed familiar! Yes, it's tricky digging out all the places where stuff like this goes wrong (and in this case, we're dealing with MS tools that produce mojibake, so there is no right answer for us, best we can do is try to not make the problem worse :-() We're working on getting a pip 10 release out soon, because we're getting a lot more encoding-related issue reports (probably because Python 3.5/3.6 switched to installing in |
I can imagine it's hard to get this right everywhere and testing everything is hard too. Perhaps you should change all your test environments to have users like "Päivi". =) Hopefully pip 10 makes it to the next Python 3.5.x and 3.6.x releases. The nature of this bug is that it's impossible to upgrade pip even if a version with a fix is released. I see this was marked duplicate but no other issue was referred. Is there another issue about the same bug somewhere? Would be interesting to see more information about the root cause and the fix. |
Sorry - I hadn't hunted down the PR that fixed this. It's #4486. Ideally, I'd like our Appveyor tests to run with a non-ASCII username, or possibly a non-latin-1 encoding, but I've no idea how we'd do that. |
This can probably be done with a dedicated test using a virtualenv and doing what |
Thanks for the pointers. I noticed this was fixed already in May 2017, so apparently there have been delays with pip 10. If it's still going to be delayed and may miss next Python 3 releases, could you consider backporting fixes to pip 9.x so that it could be included instead? This is a rather severe bug for us with non-ASCII characters. |
Has this issue been fixed and the fix released? |
The fix has been released. :) The code needs a test though, which is what this issue is tracking. |
This issue is a good starting point for anyone who wants to help out with pip's development -- it's simple and the process of fixing this should be a good introduction to pip's development workflow. See the discussion above to understand what the desired fix is. Feel free to give me a mention using "@pradyunsg" if you have any questions. :) |
warning: no previously-included files found matching 'pyproject.toml' warning: install_lib: byte-compiling is disabled, skipping. Traceback (most recent call last): @pradyunsg - The question is, why should we try to work with prefered codepage instead of enforcing utf-8? Is there any problem with enforcing global utf-8 when using pip? |
Closing this since I don't think adding a test for this is particularly valuable anymore. If someone else feels otherwise, please feel free to reopen. |
Description:
Organizing training where using Python 3 for the first time. Two participants for failed to use pip for anything due to UnicodeDecodeError. After a little debugging it turned out this was due to to them having non-ASCII characters in their user name (not uncommon here in Finland) and Python 3.6 being installed under their account into a path like
C:\Users\Käyttäjä\AppData\...
. This was the default location offered by the Python installer.Both users were using Windows 10, but I was able to reproduce this with my Window 7 virtual machine as well. Account with non-ASCII characters isn't needed, it's enough to install Python into any path with non-ASCII characters. A workaround was uninstalling Python and installing it directly under
C:\
.What I've run:
The text was updated successfully, but these errors were encountered: