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, \'L
You have to uninstall your current python .....and reinstall again.......will 100% work reason --> either you have a 32 bit python or some file of the your python are corrupted (--> you have to reinstall all the libraries again ....)
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!
@ahben, I attempted to run pyinstaller in a conda environment but I am still running into the same issue as the OP.
I managed to solve the same problem by uninstalling python (installed from Microsoft store) and installing 3.8.2 from python.org.
If you've built your Python project in PyCharm
, and later installed pyinstaller
, there is a copy of the pyinstaller
program EXE in the Output subfolders.
Simple copy the full path of where the pyInstaller.exe
is located inside your PyCharm project, open CMD
as Administrator, go to your PyCharm project folder, where your .py
file is located and paste the path copied earlier (windows 10), plus add the pyInstaller.exe
extension.
i.e.
C:\Users\<<YOUR USER FOLDER>>\<<YOUR PYCHARM PROJECT>>\output\pyInstaller.exe <<YOUR python FILE>>
It will compile.
@Jelly Hsu
i think there's an access permission problem with windows. specifically with C:\Program Files\WindowsApps folder. (it's hidden) but i think this is the problem.
anyway i created a virtual environment, installed pyinstaller within the venv, and everything worked fine.