#1527·thefuck

Python 3.13 中的 imp 导入已过时。

作者: dudu-14创建于 2025年8月31日更新于 2026年8月21日

My system: Windows 11 24H2 Pro Workstation Edition My environment: Python 3.13 (Microsoft Store), Python 3.13, Python 3.12 Installation command: python3.13 -m pip install thefuck My terminal: PowerShell This is my terminal when the Bug occurred: <img width="2350" height="1375" alt="Image" src="https://GitHub.com/user-attachments/assets/04390463-ad7e-4cfd-8a1c-78ba3f3a56b7" /> This is the error message: Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\Scripts\fuck.exe\__main__.py", line 2, in <module> from thefuck.entrypoints.not_configured import main File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\thefuck\entrypoints\not_configured.py", line 13, in <module> from .. import logs, const # noqa: E402 ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\thefuck\logs.py", line 8, in <module> from .conf import settings File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\thefuck\conf.py", line 1, in <module> from imp import load_source ModuleNotFoundError: No module named 'imp' It seems that the imp module is no longer available. The `imp` module has been gradually deprecated since Python 3.4 and was officially removed from the standard library in Python 3.12. In Python versions above 3.12, the `ModuleNotFoundError: No module named 'imp'` error occurs. This 'imp' has been replaced by 'importlib'. # 我是中国人,所有也要写一次中文版的: 我的系统:Windows 11 24H2专业工作站版 我的环境:Python 3.13(微软应用商店)、Python 3.13、Python 3.12 安装命令:python3.13 -m pip install thefuck 我的终端:PowerShell 这是Bug出现时我的终端: <img width="2350" height="1375" alt="Image" src="https://GitHub.com/user-attachments/assets/04390463-ad7e-4cfd-8a1c-78ba3f3a56b7" /> 这是错误信息: Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\Scripts\fuck.exe\__main__.py", line 2, in <module> from thefuck.entrypoints.not_configured import main File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\thefuck\entrypoints\not_configured.py", line 13, in <module> from .. import logs, const # noqa: E402 ^^^^^^^^^^^^^^^^^^^^^^^^^^ File