ModuleNotFoundError
由于for的原因,我在安装软件包时遇到了困难wrapt
,因此我删除并尝试重新安装 wrapt。
我运行了一次卸载,然后从一个位置删除了 wrapt。我尝试安装,但已经满足要求,所以我再次卸载了wrapt。请参阅下面的三个命令:
Found existing installation: wrapt 1.12.1
Uninstalling wrapt-1.12.1:
Would remove:
c:\users\me\appdata\roaming\python\python38\site-packages\wrapt-1.12.1-py3.8.egg-info
c:\users\me\appdata\roaming\python\python38\site-packages\wrapt\*
Proceed (y/n)? y
Successfully uninstalled wrapt-1.12.1
PS C:\Users\me> pip install wrapt
Requirement already satisfied: wrapt in c:\users\me\appdata\local\programs\python\python38\lib\site-packages (1.12.1)
PS C:\Users\me> pip uninstall wrapt
Found existing installation: wrapt 1.12.1
Uninstalling wrapt-1.12.1:
Would remove:
c:\users\me\appdata\local\programs\python\python38\lib\site-packages\wrapt-1.12.1.dist-info\*
c:\users\me\appdata\local\programs\python\python38\lib\site-packages\wrapt\*
Proceed (y/n)? y
Successfully uninstalled wrapt-1.12.1
我以为我已经准备好从头开始,但没有这样的运气。现在,每当我尝试运行 python 或 pip 时,都会收到以下错误。
Fatal Python error: init_import_size: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "c:\users\me\appdata\local\programs\python\python38\lib\site.py", line 580, in <module>
main()
File "c:\users\me\appdata\local\programs\python\python38\lib\site.py", line 575, in main
execusercustomize()
File "c:\users\me\appdata\local\programs\python\python38\lib\site-packages\certifi_win32\bootstrap.py", line 45, in _execusercustomize
_register_bootstrap_functions()
File "c:\users\me\appdata\local\programs\python\python38\lib\site-packages\certifi_win32\bootstrap.py", line 25, in _register_bootstrap_functions
from . import wrapt_certifi
File "c:\users\me\appdata\local\programs\python\python38\lib\site-packages\certifi_win32\wrapt_certifi.py", line 3, in <module>
import wrapt
ModuleNotFoundError: No module named 'wrapt'
我已经尝试为不使用 pip 的 wrapt 找到安装,但我没有成功。我还尝试将 Python 从 3.8.1 升级到 3.8.3,这导致了相同的 ModuleNotFoundError。卸载 Python 并再次安装产生了相同的结果。我目前根本无法使用手动安装的 Python 或 pip。
你会推荐什么?