【docker-compose】启动时报错pyrsistent SyntaxError: invalid syntax

报错信息:

# docker-compose -h
/usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.hazmat.backends import default_backend
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 6, in <module>
    from compose.cli.main import main
  File "/usr/lib/python2.7/site-packages/compose/cli/main.py", line 24, in <module>
    from ..config import ConfigurationError
  File "/usr/lib/python2.7/site-packages/compose/config/__init__.py", line 6, in <module>
    from .config import ConfigurationError
  File "/usr/lib/python2.7/site-packages/compose/config/config.py", line 51, in <module>
    from .validation import match_named_volumes
  File "/usr/lib/python2.7/site-packages/compose/config/validation.py", line 12, in <module>
    from jsonschema import Draft4Validator
  File "/usr/lib/python2.7/site-packages/jsonschema/__init__.py", line 21, in <module>
    from jsonschema._types import TypeChecker
  File "/usr/lib/python2.7/site-packages/jsonschema/_types.py", line 3, in <module>
    from pyrsistent import pmap
  File "/usr/lib64/python2.7/site-packages/pyrsistent/__init__.py", line 3, in <module>
    from pyrsistent._pmap import pmap, m, PMap
  File "/usr/lib64/python2.7/site-packages/pyrsistent/_pmap.py", line 98
    ) from e
         ^
SyntaxError: invalid syntax

是pyristent版本(0.17.0)导致的问题。安装旧版本即可解决

 # pip install pyrsistent==0.16.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值