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

No module named pip error if username in Windows consist of cyrillic symbols #780

Open
valiaafo opened this issue Dec 16, 2021 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed windows

Comments

@valiaafo
Copy link

valiaafo commented Dec 16, 2021

Describe the bug

Opening this ticket because I think it could help others.
Fatal error from pip prevented installation when I try to install pycowsay:
1

and json.decoder.JSONDecodeError when I try to install .whl files:
3

But if the user's profile name consists of only Latin symbols, all installations are successful.
In my opinion, it is because pipx uses temporary files but TMP and TEMP environment variables include user's profile name in invalid encoding (as in Figure 1) if it is Cyrillic (maybe it can be reproduced for other cases when the user profile name includes non-Latin symbols).

The bag was reproduced in Windows 10 and Windows 8.1.
Python 3.9.9, pipx 0.16.4

How to reproduce

Example with verbose:
2

Expected behavior

Warnings or caught exceptions for cases when user profile name includes non-Latin symbols because it is really difficult to understand why the library is still not installed using pipx, because the errors the installation crashes at the moment are extremely uninformative.

@uranusjr
Copy link
Member

This may have been fixed in #811. Can you upgrade pipx and see if the problem still persists?

@cs01
Copy link
Member

cs01 commented Apr 12, 2022

I unfortunately never released a new version of pipx with the fix, but I think that would indeed fix this issue.

@valiaafo
Copy link
Author

Unfortuantely, the problem still persists.

@dukecat0
Copy link
Member

Unfortuantely, the problem still persists.

What's the output of pipx --version?

@qux-bbb
Copy link

qux-bbb commented Oct 27, 2023

Still have the error.
My computer username is "张三"

C:\Users\张三>pipx install pycowsay
Fatal error from pip prevented installation. Full pip output in file:
    C:\Users\张三\.local\pipx\logs\cmd_2023-10-27_23.43.03_pip_errors.log

Error installing pycowsay.

C:\Users\张三>pipx --version
1.2.1

The C:\Users\张三.local\pipx\logs\cmd_2023-10-27_23.43.03_pip_errors.log

PIP STDOUT
----------

PIP STDERR
----------
C:\Users\张三\.local\pipx\venvs\pycowsay\Scripts\python.exe: No module named pip

@gaborbernat
Copy link
Contributor

PR welcome.

@gaborbernat gaborbernat added bug Something isn't working help wanted Extra attention is needed labels Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed windows
Projects
None yet
Development

No branches or pull requests

6 participants