Open arsalanmohseni opened 2 weeks ago
Ran into the same issue today myself. I assume you are running Python 3.12? From what I can tell from here on Stackoverflow, imp is deprecated and removed in 3.12. thefuck would need to be updated to remove that dependency. As an intermediate solution you could switch to Python 3.11 until thefuck gets fixed, if you don't specifically need Python 3.12.
There is a solution on #1449 , for Linux at least Worked for me on Ubuntu 24 If I were you I'd try to find the equivalent file on Windows
Ran into the same issue today myself. I assume you are running Python 3.12? From what I can tell from here on Stackoverflow, imp is deprecated and removed in 3.12. thefuck would need to be updated to remove that dependency. As an intermediate solution you could switch to Python 3.11 until thefuck gets fixed, if you don't specifically need Python 3.12.
I have python 3.12 and i need it too
The output of
thefuck --version
(something likeThe Fuck 3.1 using Python 3.5.0 and Bash 4.4.12(1)-release
):File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Users\mardin it\AppData\Local\Programs\Python\Python312\Scripts\thefuck.exe__main__.py", line 4, in
File "C:\Users\mardin it\AppData\Local\Programs\Python\Python312\Lib\site-packages\thefuck\entrypoints\main.py", line 8, in
from .. import logs # noqa: E402
^^^^^^^^^^^^^^^^^^^
File "C:\Users\mardin it\AppData\Local\Programs\Python\Python312\Lib\site-packages\thefuck\logs.py", line 8, in
from .conf import settings
File "C:\Users\mardin it\AppData\Local\Programs\Python\Python312\Lib\site-packages\thefuck\conf.py", line 1, in
from imp import load_source
ModuleNotFoundError: No module named 'imp'
Your system (Debian 7, ArchLinux, Windows, etc.):
How to reproduce the bug:
The output of The Fuck with
THEFUCK_DEBUG=true
exported (typically executeexport THEFUCK_DEBUG=true
in your shell before The Fuck):If the bug only appears with a specific application, the output of that application and its version: