【发布时间】:2020-04-19 07:32:20
【问题描述】:
我在 osx 机器上。 Matplotlib 几天前工作正常,但今天当我想使用它时,它却无法导入。有一堆行,在底部它给了我一个类型错误,关于需要另一个变量的复制函数。我已经尝试重新安装它,但仍然不会让步。有什么想法吗?我对此还很陌生,所以我不知道发生了什么。
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/matplotlib/__init__.py", line 138, in <module>
from . import cbook, rcsetup
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/matplotlib/rcsetup.py", line 24, in <module>
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/matplotlib/fontconfig_pattern.py", line 18, in <module>
from pyparsing import (Literal, ZeroOrMore, Optional, Regex, StringEnd,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyparsing.py", line 5658, in <module>
_reBracketExpr = Literal("[") + Optional("^").setResultsName("negate") + Group(OneOrMore(_charRange | _singleChar)).setResultsName("body") + "]"
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyparsing.py", line 1480, in setResultsName
return self._setResultsName(name, listAllMatches)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyparsing.py", line 1483, in _setResultsName
newself = self.copy()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyparsing.py", line 1437, in copy
cpy = copy.copy(self)
TypeError: copy() missing 2 required positional arguments: 'E' and 'X'
【问题讨论】:
标签: python python-3.x macos matplotlib