thefuck Imp Error
· ☕ 1 min read
After upgrading WSL2 to 24.04 Noble, thefuck stopped working with the error ModuleNotFoundError: No module named 'imp'. It’s a known issue that stems from thefuck using a very deprecated Python package. Ubuntu in 24.04 now uses Python 3.12 which has removed that package, causing thefuck to break. You can’t pip install the latest version either, as you get an error about Python being “externally managed” now. So the fix is to use pipx to install thefuck into a virtualenv that uses Python 3.