我正在使用 python 2.7 并尝试运行 python-xbrl 包。遵循此处的确切说明,但每次我尝试import xbrl
或from xbrl import XBRLParser, GAAP, GAAPSerializer
得到
ImportError Traceback (most recent call last)
<ipython-input-2-ccb496289539> in <module>()
----> 1 import xbrl
/usr/local/lib/python2.7/dist-packages/xbrl/__init__.py in <module>()
6 version = (1, 1, 0)
7
----> 8 from .xbrl import XBRLParser, GAAP, GAAPSerializer, XBRLParserException
/usr/local/lib/python2.7/dist-packages/xbrl/xbrl.py in <module>()
3
4 import re
----> 5 from marshmallow import Serializer, fields
6 import datetime
7 import collections
ImportError: cannot import name Serializer
到目前为止,我已经更新了所有必需的包 ( pytest, pep8, marshmallow, beautifulsoup4, ordereddict, lxml, six
) 并更新 python-xbrl
了,但我仍然遇到同样的错误。