Igor Sobreira

Python 3.1.1. error on startup

After installing Python 3.1.1 for Mac OS on my Leopard I got an error trying to start python3 from Terminal:

$ python3
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown encoding: 
Abort trap

There is a "fixed" issue in the bug tracker but the problem persists in my installation. A quick workaround is to set LC_CTYPE properly. Check how it is now with the locale command (mine was UTF-8)

$ export LC_CTYPE=en_US.UTF-8

Add this to your ~/.profile.

blog comments powered by Disqus

My name is Igor Sobreira and is my website. I'm a software developer working at Real Geeks. I currently live in Hawaii doing the two things that I like most: windsurfing and writing software.

See more about me and get in touch.