繁体   English   中英

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

[英]While installing pyinstaller, this occured : ERROR: Could not install packages due to an 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'

我对 Pillow 模块有类似的问题“要求已经满足”。 我在 IDE 看到它,但它坏了。 所以我删除了C:\Python310\Lib\site-packages中的 package 文件夹并重新安装。 你可以尝试做同样的事情。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM