Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
use `locale.getpreferredencoding()` to prevent OS X locale issues #5931
Conversation
mdboom
added the
needs_review
label
Jan 28, 2016
|
Thanks that is probably the right way to go. I think we can set |
jenshnielsen
added this to the
1.5.2 (Critical bug fix release)
milestone
Jan 28, 2016
|
@jenshnielsen I wasn't sure about that flag, have put it in now. |
jenshnielsen
referenced
this pull request
Jan 29, 2016
Closed
Error when trying to import matplotlib into IPython notebook #5919
tacaswell
added a commit
that referenced
this pull request
Feb 15, 2016
|
|
tacaswell |
8e38a54
|
tacaswell
merged commit 8e38a54
into matplotlib:master
Feb 15, 2016
tacaswell
removed the
needs_review
label
Feb 15, 2016
tacaswell
added a commit
that referenced
this pull request
Feb 15, 2016
|
|
tacaswell |
2ac494f
|
|
Backported to 1.5.x as 2ac494f |
ntessore
deleted the
unknown repository branch
Feb 15, 2016
i-apellaniz
commented on cbac714
Mar 8, 2016
|
This fix works for my julia 0.5-dev. After changing the source it no longer produces the error of locale utf-8!! Thank you! |
mdboom
referenced
this pull request
Mar 16, 2016
Closed
Can´t make matplotlib run in my computer #6163
tacaswell
added a commit
to tacaswell/matplotlib
that referenced
this pull request
May 22, 2016
|
|
tacaswell |
49f0dee
|
mangolzy
commented
Nov 22, 2016
|
with numpy 1.11.2 and update my matplotlib to 1.5.1, and the change of setting in ~/.bash_profile, I find no problem in bash shell. |
|
The change to local is within Matplotlib. This has been implemented in Matplotlib 1.5.2 so the easiest is to upgrade. It's also been fixed in OSX 10.12 as far as I know (this is really a bug in OSX) and a work around has been added to python to 2.7.12 and 3.5.2 as far as I know. |
ntessore commentedJan 28, 2016
There is an issue on OS X when the locale is set to
UTF-8(no language), which happens out of the box on some systems. This has been reported before in #3870 and #5481. Such a locale cannot be parsed by Python'slocale.getdefaultlocale(), which will throwwhen importing matplotlib.
Python issue 18378 deals with this matter. There you will find the suggestion that a project should use
locale.getpreferredencoding()overlocale.getdefaultlocale()[1], which coincidentally also fixes the issue on OS X. The PR implements this change.