Skip to content

How to Fix:"No module named 'imp' " #1501

@WavesMan

Description

@WavesMan

March 3, 2025

installing thefuck via pip install thefuck in Python 3.12.3 still resulted in the error "no module named 'imp'."
Using pip uninstall thefuck and pip install --upgrade thefuck does not resolve the issue.

wavesman@wavesman-Surface-Pro:~$ fuck
Traceback (most recent call last):
  File "/home/wavesman/.local/bin/fuck", line 5, in <module>
    from thefuck.entrypoints.not_configured import main
  File "/home/wavesman/.local/lib/python3.12/site-packages/thefuck/entrypoints/not_configured.py", line 13, in <module>
    from .. import logs, const  # noqa: E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wavesman/.local/lib/python3.12/site-packages/thefuck/logs.py", line 8, in <module>
    from .conf import settings
  File "/home/wavesman/.local/lib/python3.12/site-packages/thefuck/conf.py", line 1, in <module>
    from imp import load_source
ModuleNotFoundError: No module named 'imp'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions