import matplotlib
shows the following errors:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/user/anaconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 1130, in <module>
rcParams = rc_params()
File "/Users/user/anaconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 974, in rc_params
return rc_params_from_file(fname, fail_on_error)
File "/Users/user/anaconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 1099, in rc_params_from_file
config_from_file = _rc_params_in_file(fname, fail_on_error)
File "/Users/user/anaconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 1017, in _rc_params_in_file
with _open_file_or_url(fname) as fd:
File "/Users/user/anaconda/lib/python2.7/contextlib.py", line 18, in __enter__
return self.gen.next()
File "/Users/user/anaconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 999, in _open_file_or_url
encoding = locale.getdefaultlocale()[1]
File "/Users/user/anaconda/lib/python2.7/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/Users/user/anaconda/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
TypeError: unsupported operand type(s) for &: 'str' and 'str'
The same errors show when - from matplotlib import pyplot
- is used. At first I thought the problem was because I didn't install matplotlib correctly. I initially tried with homebrew's python and after surfing through hundreds of guides on how to install it correctly, gave up out of sheer frustration. Then I tried with anaconda's python and again I got the same errors. Could someone please help me out here?