Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pyinstaller win32ctypes.pywin32.pywintypes.error: (1920, 'LoadLibraryExW', 'System cannot access the file')

I'm trying to use the pyinstaller to pack my python file in to .exe, but I keep getting this error message.

win32ctypes.pywin32.pywintypes.error: (1920, 'LoadLibraryExW', 'System can not access the file')

I've tried running the cmd as administrator but it's still not working.

My operating system is Windows 10

like image 725
Jelly Hsu Avatar asked Jul 24 '19 10:07

Jelly Hsu


2 Answers

I managed to solve the same problem by uninstalling python (installed from Microsoft store) and installing 3.8.2 from python.org.

like image 136
RobinBobin Avatar answered Oct 02 '22 15:10

RobinBobin


I had the same problem. Just move your python file in your C:\Users\batman\AppData\Local\Programs\Python\Python38-32\Scripts folder where you can also find pyinstaller.exe and run the windows command prompt there and try again!

like image 32
KlopapierGames Avatar answered Oct 02 '22 16:10

KlopapierGames