AttributeError: ‘module’ object has no attribute ‘unique’

Complete error message:

docker-compose --version
Traceback (most recent call last):
  File "/bin/docker-compose", line 7, in <module>
    from compose.cli.main import main
  File "/usr/lib/python2.7/site-packages/compose/cli/main.py", line 22, in <module>
    from ..bundle import get_image_digests
  File "/usr/lib/python2.7/site-packages/compose/bundle.py", line 14, in <module>
    from .service import format_environment
  File "/usr/lib/python2.7/site-packages/compose/service.py", line 131, in <module>
    @enum.unique
AttributeError: 'module' object has no attribute 'unique'

Solution:

pip uninstall enum enum34
pip install enum34
docker-compose --version
docker-compose version 1.22.0, build f46880f

 

Leave A Comment