简体   繁体   中英

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.

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. I saw it in IDE, but it was broken. So I deleted the package folder in C:\Python310\Lib\site-packages and reinstalled it. You could try to do the same.

I had the same issue. I solved it by uninstallation of partially installed pyinstaller. Then I installed it as Administrator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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