0

I'm trying to create a exe file from my .py file but using both, PYINSTALLER and PY2EXE gives me a strange error:

create EXE error

The google.py file that I'm tying to create EXE existis in the requested directory and both PYINSTALLER and PY2EXE are correctlly installed.

Does anyone know the root cause of the issue? How could I create a exe file from a .PY?

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
Anton
  • 3
  • 6
  • Did you do anythign differently than e.g. described in this tutorial? http://www.py2exe.org/index.cgi/Tutorial – Yunnosch Jul 11 '18 at 15:33
  • This seems relevant: https://stackoverflow.com/q/50093977/4996248 The fact that you are getting the exact same error message with two different modules suggests that those modules are not the problem. The problem seems to be related to the Google Drive API, which you seem to be using. – John Coleman Jul 11 '18 at 15:53

1 Answers1

2

As I know you must use argument --onefile Without it the libraries will be distributed as separate file along with the executable. Here is exaple:

pyinstaller --onefile script.py

maxrt
  • 19
  • 4
  • I still having the same error: >pyinstaller --onefile google.py usage: pyinstaller-script.py [-h] [--auth_host_name AUTH_HOST_NAME] [--noauth_local_webserver] [--auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]] [--logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] pyinstaller-script.py: error: unrecognized arguments: --onefile google.py – Anton Jul 11 '18 at 15:46
  • 1
    Is your script - google.py located in the same directory as pyinstaller? – maxrt Jul 11 '18 at 21:07
  • @maxrt is right. The script should be in the same directory as pyinstaller and by looking at the command window it doesn't look like it is in the same directory. – kkblue Aug 01 '18 at 08:50