简体   繁体   English

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

[英]While installing pyinstaller, this occured : ERROR: Could not install packages due to an OSError: [WinError 2]

When I try to install pyinstaller in windows machine through pip gives me the following error.当我尝试通过pip在 windows 机器上安装pyinstaller时,出现以下错误。

What I tried:我尝试了什么:

pip install pyinstaller

Error:错误:

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'

I had a similar problem " Requirement already satisfied " with the Pillow module.我对 Pillow 模块有类似的问题“要求已经满足”。 I saw it in IDE, but it was broken.我在 IDE 看到它,但它坏了。 So I deleted the package folder in C:\Python310\Lib\site-packages and reinstalled it.所以我删除了C:\Python310\Lib\site-packages中的 package 文件夹并重新安装。 You could try to do the same.你可以尝试做同样的事情。

I had the same issue.我遇到过同样的问题。 I solved it by uninstallation of partially installed pyinstaller.我通过卸载部分安装的 pyinstaller 解决了这个问题。 Then I installed it as Administrator.然后我以管理员身份安装它。

暂无
暂无

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

相关问题 由于错误无法在 windows 10 上安装“pip install pipenv”:由于 OSError 无法安装软件包:[WinError 2] - Could not install 'pip install pipenv' on windows 10 due to ERROR: Could not install packages due to an OSError: [WinError 2] 由于 OSError 无法安装软件包:[WinError 5] 访问被拒绝 - Could not install packages due to an OSError: [WinError 5] Access is denied 由于 OSError 无法安装软件包:[WinError 2] 没有这样的文件或目录 - Could not install packages due to an OSError: [WinError 2] No such file or directory 错误:由于 OSError 无法安装软件包? - ERROR: Could not install packages due to an OSError? Pip 安装包错误:由于 OSError 无法安装包 - Pip Install Package Error: Could not install packages due to an OSError 由于 OSError 无法安装 pandas_profiling 包:[WinError 5] 访问被拒绝 - Could not install pandas_profiling packages due to an OSError: [WinError 5] Access is denied 由于环境错误,python 错误无法安装软件包 winerror 5 访问被拒绝 - python error could not install packages due to an environmenterror winerror 5 access is denied 错误:由于 OSError 无法安装软件包:[Errno 39] 目录不为空 - ERROR: Could not install packages due to an OSError: [Errno 39] Directory not empty docker 错误:由于 OSError 无法安装软件包:[Errno 2] - docker ERROR: Could not install packages due to an OSError: [Errno 2] 错误:由于 OSError 无法安装软件包:[Errno 22] 参数无效 - ERROR: Could not install packages due to an OSError: [Errno 22] Invalid argument
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM