3 Simple Steps to fix ipython notebook error on MAC OS X

ipython notebook debuggingI thought I did something stupid to my installation of python on mac and python notebook stopped working. ipython works but ipython notebook went haywire.

Tried reinstalling python but the problem remained. Everytime got this error when ipython notebook was invoked.

return _parse_localename(localename)
File "/Users/millerc/anaconda/lib/python2.7/locale.py", line 435, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

Today, the lazy me corrected the problem with help from this post. It turns out the error occurs after installing the latest Mac OSX 64-bit python.

Fortunately the solution is simple. Follow the 3 simple solution steps

Step 1
open your .bash_profile

Step 2
Add these lines to your .bash_profile:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

Step 3
Reloaded the profile:

source ~/.bash_profile

Now run ipython notebook

ipython notebook

Done.

3 thoughts on “3 Simple Steps to fix ipython notebook error on MAC OS X

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s