1

I can't get matplotlib to work under OS X El Capitan. I am using Python 3.5.2 and I have Anaconda 4.1.1 installed.

Similar to other post, when I try to run a simple program involving matplotlib (happens with any example I have tried), I get the following:

Traceback (most recent call last):

File "example2.py", line 1, in <module> import matplotlib.pyplot as plt

File "//anaconda/lib/python3.5/site-packages/matplotlib/__init__.py", line 1131, in <module> rcParams = rc_params()

File "//anaconda/lib/python3.5/site-packages/matplotlib/__init__.py", line 975, in rc_params return rc_params_from_file(fname, fail_on_error)

File "//anaconda/lib/python3.5/site-packages/matplotlib/__init__.py", line 1100, in rc_params_from_file config_from_file = _rc_params_in_file(fname, fail_on_error)

File "//anaconda/lib/python3.5/site-packages/matplotlib/__init__.py", line 1018, in _rc_params_in_file with _open_file_or_url(fname) as fd:

File "//anaconda/lib/python3.5/contextlib.py", line 59, in __enter__
    return next(self.gen)

File "//anaconda/lib/python3.5/site-packages/matplotlib/__init__.py", line 1000, in _open_file_or_url encoding = locale.getdefaultlocale()[1]

File "//anaconda/lib/python3.5/locale.py", line 558, in getdefaultlocale return parse_localename(localename)

File "//anaconda/lib/python3.5/locale.py", line 486, in _parse_localename raise 

ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8

Any hints how to get out of this? Thanks!

Daniel
  • 10,641
  • 12
  • 47
  • 85
Gonzalo
  • 11
  • 2
  • [This](http://stackoverflow.com/questions/19961239/pelican-3-3-pelican-quickstart-error-valueerror-unknown-locale-utf-8) might just be what you're dealing with. – Abdou Sep 04 '16 at 21:04
  • Thanks Abdou. It worked! – Gonzalo Sep 07 '16 at 01:59

0 Answers0