如何解决OSError:[WinError 2]不可能找到指定的文件:"c:\\python39\\Scripts\\chardetect.exe"



如标题所述,每次我尝试通过pip安装东西时,在安装结束时,它都会给我一个错误

WARNING: Failed to write executable - trying to use .deleteme logic
Rolling back uninstall of chardet
Moving to c:python39libsite-packageschardet-4.0.0.dist-info
from C:Python39Libsite-packages~hardet-4.0.0.dist-info
Moving to c:python39libsite-packageschardet
from C:Python39Libsite-packages~hardet
ERROR: Could not install packages due to an OSError: [WinError 2] Impossibile trovare il file specificato: 'c:\python39\Scripts\chardetect.exe' -> 'c:\python39\Scripts\chardetect.exe.deleteme'*

已经尝试

python -m pip install -U pip --user

但上面写着

已满足要求:c:\users\paolo\appdata\roaching\python\python39\site软件包中的pip(21.0.1(

我不明白为什么,在互联网上也找不到任何东西。请帮忙!

之后

python -m pip install -U pip --user

命令,重新运行安装。

最新更新