[Matplotlib-users] Install/Import error rcParams

Eric Firing efiring at hawaii.edu
Mon May 16 22:19:13 EDT 2016


Please see https://github.com/matplotlib/matplotlib/issues/5420 for 
solutions.

Eric

On 2016/04/18 12:04 AM, yukicyk wrote:
> Hi all,
>
> I am trying to install matplotlib on my iMac OSX El Capitan Version 10.114
> but failed.
> OS info: Darwin OBs-iMac.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb
> 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
>
> gcc --version
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> Apple LLVM version 7.3.0 (clang-703.0.29)
> Target: x86_64-apple-darwin15.4.0
> Thread model: posix
> InstalledDir:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
>
> I installed python using HomeBrew and pip install matplotlib.
>
> I got the following messages when i tried to import matplotlib:
>
> Python 2.7.11 (default, Jan 22 2016, 08:29:18)
> [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import matplotlib
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line
> 1131, in <module>
>     rcParams = rc_params()
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line
> 975, in rc_params
>     return rc_params_from_file(fname, fail_on_error)
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line
> 1100, in rc_params_from_file
>     config_from_file = _rc_params_in_file(fname, fail_on_error)
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line
> 1018, in _rc_params_in_file
>     with _open_file_or_url(fname) as fd:
>   File
> "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py",
> line 17, in __enter__
>     return self.gen.next()
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line
> 1000, in _open_file_or_url
>     encoding = locale.getdefaultlocale()[1]
>   File
> "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py",
> line 543, in getdefaultlocale
>     return _parse_localename(localename)
>   File
> "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py",
> line 475, in _parse_localename
>     raise ValueError, 'unknown locale: %s' % localename
> ValueError: unknown locale: UTF-8
>
>
> I later installed Anaconda hoping to resolve this problem, but still
> encounter the same error.
> Python 2.7.11 |Anaconda 4.0.0 (x86_64)| (default, Dec  6 2015, 18:57:58)
> [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
>
> I would greatly appreciate for any help on this.
>
> cheers,
> yuki
>
>
>
> --
> View this message in context: http://matplotlib.1069221.n5.nabble.com/Install-Import-error-rcParams-tp46967.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>



More information about the Matplotlib-users mailing list