python3 fail to start

T

ts

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
streams
LookupError: unknown encoding:
Abort trap

couldnt understand the problem. anyone can help?
 
M

Mark Dickinson

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
streams
LookupError: unknown encoding:
Abort trap

couldnt understand the problem. anyone can help?

Hmm. It's working fine for me (OS X 10.5.7/Macbook Pro). What
version
of OS X are you using? How are you running python3---by typing
'python3' at
a Terminal prompt, I assume? What's the output of the 'locale'
command on
your system?

Mark
 
M

Mark Dickinson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top