[Python] ImportError: No module named elftools.common.py3compat

Discussão em 'Python' iniciado por Stack, Janeiro 8, 2025.

  1. Stack

    Stack Membro Participativo

    Trying to execute a python script, I receive this error message:

    $ Couldn't import dot_parser, loading of dot files will not be possible.
    Traceback (most recent call last):
    File "./abc.py", line 19, in <module>
    import elftools.common.py3compat
    ImportError: No module named elftools.common.py3compat


    I tried to resolve the issue as follows (along the lines of this hint):

    pip install paramiko


    It seems to install without any problems:

    $ pip show paramiko
    Name: paramiko
    Version: 2.2.1
    Summary: SSH2 protocol library
    Home-page: https://github.com/paramiko/paramiko/
    Author: Jeff Forcier
    Author-email: jeff@bitprophet.org
    License: LGPL
    Location: /usr/local/lib/python2.7/dist-packages
    Requires: pynacl, pyasn1, bcrypt, cryptography


    However, it does not resolve the initial dependency problem. Executing the script again results in the same error message that py3compat module cannot be found.

    $ python -V
    Python 2.7.12
    $ pip -V
    pip 9.0.1 from /home/xyz/.local/lib/python2.7/site-packages (python 2.7)

    Continue reading...

Compartilhe esta Página