[Distutils] Encoding error installing my own package from PyPI
Daniel Holth
dholth at gmail.com
Fri Dec 13 18:45:42 CET 2013
On Fri, Dec 13, 2013 at 12:40 PM, Lele Gaifax <lele at metapensiero.it> wrote:
> Daniel Holth <dholth at gmail.com> writes:
>
>> On Thu, Dec 12, 2013 at 6:02 PM, Éric Araujo <merwok at netwok.org> wrote:
>>> Distutils is not fully aware of unicode. Something to try: open your files
>>> like you do and get their contents as unicode, but encode the result to
>>> UTF-8 bytes before passing it to the setup function.
>>>
>>> I thinks this is worth reporting to bugs.python.org, if it isn’t already.
>
>> This is a pip bug. Could Python 3.3 be doing something different or is
>> your default encoding for open() different than the typical pip
>> developer's?
>>
>> https://github.com/pypa/pip/issues/1298
>
> FTR, no, Éric suggestion didn't work, it just failed very earlier in the
> process, at sdist time.
>
> After a few other iterations, I was able to find the culprit: as said, I was
> trying to install it into a fresh Python 3.3.3 environment, within a
> virtual machine which system locales weren't properly configured for
> some reason; after a "dpkg-reconfigure locales" and setting the LANG
> environment variable, everything went smooth!
>
> I don't know if #1298 is related to the same problem (will report my
> experience there, anyway).
>
> Thanks a lot,
> ciao, lele.
It is still a pip bug. Portable Python programs should never open
files without an explicit encoding because doing so creates bugs that
you only find when you ssh into a machine configured for the German
language from your English-language machine or whatever. Glad you were
able to resolve.
More information about the Distutils-SIG
mailing list