baidu / Curve

An Integrated Experimental Platform for time series data anomaly detection.
http://curve.baidu.com
Apache License 2.0
531 stars 134 forks source link

安装过程中报错 #88

Open wuxie2015 opened 4 years ago

wuxie2015 commented 4 years ago

image 在an zhuang guo ch安装过程中,报错 Traceback (most recent call last): File "/Users/zhanglin/Documents/tools/Curve_bak/Curve/venv/bin/swagger_py_codegen", line 5, in from swagger_py_codegen import generate File "/Users/zhanglin/Documents/tools/Curve_bak/Curve/venv/lib/python2.7/site-packages/swagger_py_codegen/init.py", line 4, in from .command import generate File "/Users/zhanglin/Documents/tools/Curve_bak/Curve/venv/lib/python2.7/site-packages/swagger_py_codegen/command.py", line 15, in from .flask import FlaskGenerator File "/Users/zhanglin/Documents/tools/Curve_bak/Curve/venv/lib/python2.7/site-packages/swagger_py_codegen/flask.py", line 6, in from .jsonschema import Schema, SchemaGenerator, build_default File "/Users/zhanglin/Documents/tools/Curve_bak/Curve/venv/lib/python2.7/site-packages/swagger_py_codegen/jsonschema.py", line 6, in from .parser import schema_var_name File "/Users/zhanglin/Documents/tools/Curve_bak/Curve/venv/lib/python2.7/site-packages/swagger_py_codegen/parser.py", line 5, in import dpath.util File "/Users/zhanglin/Documents/tools/Curve_bak/Curve/venv/lib/python2.7/site-packages/dpath/util.py", line 1, in from collections.abc import MutableMapping ImportError: No module named abc 但是colleciton.abc不是python3才支持的吗?

minorcong commented 4 years ago

也许应该调整下 swagger_py_codegen 的版本?

brianhill11 commented 4 years ago

I had same issue... as a hacky fix I changed the import statement in Curve/venv/lib/python2.7/site-packages/dpath/util.py from

from collections.abc import MutableMapping
from collections.abc import MutableSequence

to

try:
    from collections.abc import MutableMapping
    from collections.abc import MutableSequence
except ImportError:
    from collections import MutableMapping
    from collections import MutableSequence

and it seems to work.

alumik commented 3 years ago

也许应该调整下 swagger_py_codegen 的版本?

I've submitted a pull request, adding dpath==1.5.0 as an explicit requirement.