[Python-Dev] Installing Python to non-ASCII paths

Paul Moore p.f.moore at gmail.com
Sun Mar 22 15:44:12 CET 2015


Something that hit me today, which might become a more common issue
when the Windows installers move towards installing to the user
directory, is that there appear to be some bugs in handling of
non-ASCII paths.

Two that I spotted are a failure of the "script wrappers" installed by
pip to work with a non-ASCII interpreter path (reported to distlib)
and a possible issue with the py.exe launcher when a script has
non-ASCII in the shebang line (not reported yet because I'm not clear
on what's going on).

I've only seen Windows-specific issues - I don't know how common
non-ASCII paths for the python interpreter are on Unix or OSX, or
whether the more or less universal use of UTF-8 on Unix makes such
issues less common. But if anyone has an environment that makes
testing on non-ASCII install paths easy, it might be worth doing some
checks just so we can catch any major ones before 3.5 is released.

On which note, I'm assuming neither of the issues I've found are major
blockers. "pip.exe doesn't work if Python is installed in a directory
with non-ASCII characters in the name" can be worked around by using
python -m pip, and the launcher issue by using a generic shebang like
#!/usr/bin/python3.5.

Paul


More information about the Python-Dev mailing list