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

后端 未结 8 1973
攒了一身酷
攒了一身酷 2020-12-11 08:14

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         


        
相关标签:
8条回答
  • 2020-12-11 08:19

    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 ....)

    0 讨论(0)
  • 2020-12-11 08:25

    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!

    0 讨论(0)
  • 2020-12-11 08:26

    @ahben, I attempted to run pyinstaller in a conda environment but I am still running into the same issue as the OP.

    0 讨论(0)
  • 2020-12-11 08:27

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

    0 讨论(0)
  • 2020-12-11 08:33

    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.

    0 讨论(0)
  • 2020-12-11 08:35

    @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.

    0 讨论(0)
提交回复
热议问题