python3 fail to start

Mark Dickinson dickinsm at gmail.com
Thu Jul 9 04:29:02 EDT 2009


On Jun 30, 3:43 pm, ts <thaisi... at gmail.com> wrote:
> i just install the python 3.1 dmg onto my mac. when i run python3, it
> fail with :
>
> Fatal Python error: Py_Initialize: can't initialize sys standard
> streamsLookupError: unknown encoding:
> Abort trap
>
> couldnt understand the problem. anyone can help?

Any chance you could give us some feedback about your system?  The
Python devs are working to fix the problem:

http://bugs.python.org/issue6393

but it would be really helpful to know:

- what version of OS X you're using
- what output you get when you type 'locale' at a Terminal prompt
- what the International settings are in your Terminal preferences
  (Terminal preferences -> Settings -> Advanced tab):  what's the
  setting for the character encoding, and do you have the 'Set LANG
  environment variable at startup' checkbox checked?

I managed to reproduce the crash by starting python3 (again
at a Terminal prompt) with:

LANG=UTF-8 python3

So I suspect that your locale settings are part of the problem.
As a temporary workaround, something like

LANG=en_US.UTF-8 python3

might work.  (Substitute whatever language setting is appropriate
for you in place of en_US.)

Thanks!

Mark



More information about the Python-list mailing list