Error loading python27.dll error for pyinstaller

前端 未结 5 1621
故里飘歌
故里飘歌 2020-12-30 09:15

I have successfully edited my spec file and added the folder with my data to it. It builds fine but it still can\'t access the data. WHen i try to run the compiled .exe i ge

相关标签:
5条回答
  • 2020-12-30 09:24

    You put that code snippet right at the top of the Python script you are turning into an executable - not in the spec and not in its own script. I found an example here:

    https://shanetully.com/2013/08/cross-platform-deployment-of-python-applications-with-pyinstaller/

    0 讨论(0)
  • 2020-12-30 09:32

    I encountered the same issue, and finally find the reason is anti-virus software treat "python27.dll" as a trojan, and deleted it when exe try to load.

    The problem is solved by add "...\AppData\Local\Temp\" to trusted zone.

    0 讨论(0)
  • 2020-12-30 09:35

    I found same error after creating a standalone executable like this:

    pyi-makespec.exe -F program.py
    ## Customize script.spec just created
    

    and

    pyinstaller.exe -F script.spec
    

    so I needed to run the executable as administrator to solve it.

    I don't know the reason because it wasn't my computer. I had done the process in mine first and worked like a charm but not there. Perhaps some security configuration or a weird installation of python or wxpython, but I add this solution here because I was looking for hours without success, and it's a simple task that can save you some time before trying more complex approaches.

    0 讨论(0)
  • 2020-12-30 09:37

    Having the same issue on python3.7 on windows 10.

    Fixed this by adding --upx-exclude"vcruntime140.dll" option.

    More info can be found here

    0 讨论(0)
  • 2020-12-30 09:37

    One simple thing to do is to delete all the stuff in the following folder: C:\Users\xxx\AppData\Roaming\pyinstaller. I've fixed the issue after I cleaned this folder. Maybe also delete all the files which are created by Pyinstaller last time.

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