os x el capitan中的matplotlib导入错误

时间:2016-01-20 17:09:40

标签: python matplotlib homebrew anaconda osx-elcapitan

vagrant provision显示以下错误:

import matplotlib

使用 - 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' - 时显示相同的错误。起初我认为问题是因为我没有正确安装matplotlib。我最初尝试使用自制软件的python,在浏览了数百个关于如何正确安装它的指南后,放弃了纯粹的挫败感。然后我尝试使用anaconda的python,我又遇到了同样的错误。有人可以帮帮我吗?

0 个答案:

没有答案