0

I've been trying for a long time to convert my .py file which is 100% working into a .exe file so that I can click it and run it without going into the python editor. I followed these steps: https://stackoverflow.com/a/44433442/12309053 but nothing has been working. I'm having issues when I try to run the python setup.py build line, I don't get an error it just doesn't run and outputs another line for me to input a command again. I believe to have successfully installed cx_freeze as well as pyinstaller(not sure if relevant).

I'm struggling to figure out why I can't run this command.

I did run a command prior to trying the steps listed in the other forum, which lead me to actually create build folders etc. The problem was there was no .exe file to run and there was error in the command prompt. I apologize as I forget what I ran before.

Recieve the output when running pyinstaller:

'''
  File "c:\users\jamal\appdata\local\programs\python\python38-32\lib\site- packages\PyInstaller\building\utils.py", line 653, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File "c:\users\jamal\appdata\local\programs\python\python38-32\lib\site- packages\PyInstaller\building\utils.py", line 660, in strip_paths_in_code
    return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, 
co.co_stacksize,
TypeError: an integer is required (got type bytes)
  • 1
    Try pyinstaller (second answer in the thread you mentioned) – w8eight Dec 06 '19 at 14:43
  • I've edited in my error message when using pyinstaller. – theyoungcoder Dec 06 '19 at 15:16
  • 1
    There is a thread on the github for [pyinstaller](https://github.com/pyinstaller/pyinstaller/issues/4265#issuecomment-546221741) that recommends you run this command to resolve your issue: `pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz` – KILLtheWEEZEL Dec 06 '19 at 15:21
  • Does this answer your question? [How to make a Python script standalone executable to run without ANY dependency?](https://stackoverflow.com/questions/5458048/how-to-make-a-python-script-standalone-executable-to-run-without-any-dependency) – kaya3 Dec 06 '19 at 15:27
  • 1
    That worked!!! @KILLtheWEEZEL. Thanks so much. – theyoungcoder Dec 06 '19 at 15:32
  • Glad I could help! – KILLtheWEEZEL Dec 06 '19 at 18:01

0 Answers0