TransWikia.com

Docker-compose throwing error on any invocation

Ask Ubuntu Asked by arkostin01 on December 28, 2020

I installed docker-compose using sudo apt-get install docker-compose

On any invocation (Even just getting version using -v flag), it throws the following:

/usr/lib/python2.7/dist-packages/OpenSSL/crypto.py:12: 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 a future release.
  from cryptography import x509
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.17.1', 'console_scripts', 'docker-compose')()
  File "/home/akost/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/akost/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "/home/akost/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/home/akost/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 17, in <module>
    from . import errors
  File "/usr/lib/python2.7/dist-packages/compose/cli/errors.py", line 11, in <module>
    from docker.errors import APIError
  File "/usr/lib/python2.7/dist-packages/docker/__init__.py", line 2, in <module>
    from .api import APIClient
  File "/usr/lib/python2.7/dist-packages/docker/api/__init__.py", line 2, in <module>
    from .client import APIClient
  File "/usr/lib/python2.7/dist-packages/docker/api/client.py", line 6, in <module>
    import requests
  File "/home/akost/.local/lib/python2.7/site-packages/requests/__init__.py", line 84, in <module>
    from urllib3.contrib import pyopenssl
  File "/home/akost/.local/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 12, in <module>
    from cryptography import x509
  File "/home/akost/.local/lib/python2.7/site-packages/cryptography/x509/__init__.py", line 8, in <module>
    from cryptography.x509.base import (
  File "/home/akost/.local/lib/python2.7/site-packages/cryptography/x509/base.py", line 23, in <module>
    from cryptography.x509.extensions import Extension, ExtensionType
  File "/home/akost/.local/lib/python2.7/site-packages/cryptography/x509/extensions.py", line 28, in <module>
    from cryptography.x509.general_name import GeneralName, IPAddress, OtherName
  File "/home/akost/.local/lib/python2.7/site-packages/cryptography/x509/general_name.py", line 14, in <module>
    from cryptography.x509.name import Name
  File "/home/akost/.local/lib/python2.7/site-packages/cryptography/x509/name.py", line 29, in <module>
    _ASN1_TYPE_TO_ENUM = {i.value: i for i in _ASN1Type}
TypeError: 'type' object is not iterable

It seems to be a Python error, I’ve reinstalled the cryptography library using pip2.7, still doesn’t work. Any pointers are very much appreciated!

Running Ubuntu 18.04.

One Answer

Turns out the issue was with python, something in the 'cryptography' package was preventing OpenSSL from being used, fixed it with rm -rf ~/.local/lib/python2.7/site-packages/cryptography.

Answered by arkostin01 on December 28, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP