安装pyinstaller时,出现以下情况:错误:由于OSError:[WinError 2],无法安装程序包



当我试图通过pip在windows机器中安装pyinstaller时,会出现以下错误。

我尝试过的:

pip install pyinstaller

错误:

Installing collected packages: pyinstaller
WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an OSError: [WinError 2] The 
system cannot find the file specified: 'C:\...\Python310\Scripts\pyi-archive_viewer.exe' ->
'C:\...\Python310\Scripts\pyi-archive_viewer.exe.deleteme'

我也遇到过类似的问题">要求已经满足";带有枕头模块。我在IDE中看到了它,但它坏了。所以我删除了C:Python310Libsite-packages中的软件包文件夹并重新安装了它。你也可以尝试这样做。

我遇到了同样的问题。我通过卸载部分安装的pyinstaller解决了这个问题。然后我以管理员身份安装了它。

相关内容

最新更新