-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to Fix:"No module named 'imp' " #1501
Comments
Solution:Visit the repository: DL9090/the-fuck/imp-bug-fix
Extract the downloaded files into a folder, then navigate to the folder's path and run: Reason for the Issue:Python has removed the References:解决方法:前往仓库:DL9090/the-fuck/ipm-bug-fix 问题原因:Python has removed imp as of python 3.12. C.f.: https://docs.python.org/3/library/imp.html for details 参考: |
As @WavesMan said, you need a more recent version that supports 3.12 (or 3.13 in my case). While waiting for a newer version to be on PyPi, and instead of downloading and extracting this repo you can : pip install git+https://github.com/nvbn/thefuck.git |
Alternatively to @WavesMan's solution, install the patched version directly from pip. pip install git+https://github.com/DL909/thefuck.git |
March 3, 2025
installing
thefuck
viapip install thefuck
in Python 3.12.3 still resulted in the error "no module named 'imp'."Using
pip uninstall thefuck
andpip install --upgrade thefuck
does not resolve the issue.The text was updated successfully, but these errors were encountered: