The output of thefuck --version (something like The Fuck 3.1 using Python 3.5.0):
<--The command doesn't work, this is the output from the command-->
Traceback (most recent call last):
File "/usr/local/bin/fuck", line 7, in
from thefuck.entrypoints.not_configured import main
ModuleNotFoundError: No module named 'thefuck'
<--Here is the version retrieved from apt show thefuck-->
3.11-2
Your shell and its version (bash, zsh, Windows PowerShell, etc.):
bash 4.4.19(1)-release
Your system (Debian 7, ArchLinux, Windows, etc.):
Linux Mint 19 "Tara"
How to reproduce the bug:
There are several ways to cause this issue to happen:
The output of The Fuck with THEFUCK_DEBUG=true exported (typically execute export THEFUCK_DEBUG=true in your shell before The Fuck):
Traceback (most recent call last):
File "/usr/local/bin/fuck", line 7, in
from thefuck.entrypoints.not_configured import main
ModuleNotFoundError: No module named 'thefuck'
If the bug only appears with a specific application, the output of that application and its version:
N/A
Anything else you think is relevant:
This started occurring after I upgraded from Linux Mint 18.3 to Linux Mint 19. thefuck was removed during the update process, and the error started occurring. After I saw that the error was happening, I installed thefuck again, and nothing changed. I then tried removing it and installing it again, and that still didn't fix the issue. If I can provide any additional info or do anything on my end to fix this, please let me know.
Sorry to know that you're having issues.
What is the output of which thefuck?
Also, what is PATH defined as? i.e. what's the output of echo $PATH
Hope to get it solved soon.
Output of which thefuck:
/usr/local/bin/thefuck
Output of echo $PATH:
/home/lance/bin:/home/lance/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
You said you reinstalled thefuck with APT. So, what is the output of:
ls -lha /usr/bin/thefuck
/usr/bin/thefuck --version
Output of ls -lha /usr/bin/thefuck:
lrwxrwxrwx 1 root root 29 Oct 5 2016 /usr/bin/thefuck -> ../share/thefuck/thefuck.real
Output of /usr/bin/thefuck --version:
The Fuck 3.11 using Python 2.7.15rc1
That's looking better.
It seems that another installation method installed TheFuck binaries in /usr/local/bin but left it somehow, let's say, "corrupted". APT, on the other hand, puts binaries in /usr/bin.
As /usr/local/bin precedes /usr/bin in PATH:
...:/usr/local/bin:/usr/sbin:/usr/bin:...
the "corrupted" installed TheFuck takes precedence over APT's. So, go ahead and remove the binaries from /usr/local/bin:
rm /usr/local/bin/thefuck
rm /usr/local/bin/fuck
That fixed the issue! Thanks for all the help and the quick responses.
Most helpful comment
That's looking better.
It seems that another installation method installed TheFuck binaries in
/usr/local/binbut left it somehow, let's say, "corrupted". APT, on the other hand, puts binaries in/usr/bin.As
/usr/local/binprecedes/usr/binin PATH:the "corrupted" installed TheFuck takes precedence over APT's. So, go ahead and remove the binaries from
/usr/local/bin: