Python Forum
Trouble making my first python .exe using pyinstaller.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble making my first python .exe using pyinstaller.
#1
I am trying to make a win 10 executable (.exe) from my helloworld.py script. I have installed pyinstall-3.2 and following the install document isn't so easy.
Any help getting this working will be appreciated.

PyInstaller is located at:
Quote:
c:\pyInstaller-3.2

helloworld.py and hellowworld.bat are both at:

Quote:c:\users\michael\desktop\helloworld\


Here is the Bat file
python c:\pyInstaller-3.2\Makespec.py --onefile --console --upx --tk helloworld.py
python c:\pyInstaller-3.2\PyInstaller\building\build_main.py helloworld.spec
pause
Here is helloworld.py
#!/usr/bin/env python 

for i in xrange(1000): 
    print "Hello, World!"
Finally, here are the error messages:

Error:
C:\Users\Michael\Desktop\helloworld>python c:\pyInstaller-3.2\Makespec.py --onefile --console --upx --tk helloworld.py usage: Makespec.py [-h] [-D] [-F] [--specpath DIR] [-n NAME] [-p DIR]                    [--hidden-import MODULENAME]                    [--additional-hooks-dir HOOKSPATH]                    [--runtime-hook RUNTIME_HOOKS] [--exclude-module EXCLUDES]                    [--key KEY] [-d] [-s] [--noupx] [-c] [-w]                    [-i <FILE.ico or FILE.exe,ID or FILE.icns>]                    [--version-file FILE] [-m <FILE or XML>] [-r RESOURCE]                    [--uac-admin] [--uac-uiaccess] [--win-private-assemblies]                    [--win-no-prefer-redirects]                    [--osx-bundle-identifier BUNDLE_IDENTIFIER]                    [--log-level LEVEL] [--upx UPX]                    scriptname [scriptname ...] Makespec.py: error: argument --upx/-X/-K/--tk/-C/--configfile/--skip-configure/-o/--out/--buildpath: expected one argument C:\Users\Michael\Desktop\helloworld>python c:\pyInstaller-3.2\PyInstaller\building\build_main.py helloworld.spec Traceback (most recent call last):   File "c:\pyInstaller-3.2\PyInstaller\building\build_main.py", line 27, in <module>     from .. import HOMEPATH, DEFAULT_DISTPATH, DEFAULT_WORKPATH ValueError: Attempted relative import in non-package C:\Users\Michael\Desktop\helloworld>pause Press any key to continue . . .
Reply


Messages In This Thread
Trouble making my first python .exe using pyinstaller. - by PickyBiker - Dec-08-2016, 09:30 PM
RE: Trouble making my first python .exe - by Yoriz - Dec-08-2016, 10:00 PM
RE: Trouble making my first python .exe - by Yoriz - Dec-08-2016, 11:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trouble with installing python domingo251 2 618 Sep-23-2023, 12:03 AM
Last Post: ICanIBB
  Pyinstaller 3 Python 2 mckymntl 0 1,241 Feb-07-2022, 06:28 AM
Last Post: mckymntl
  making variables in my columns and rows in python kronhamilton 2 1,646 Oct-31-2021, 10:38 AM
Last Post: snippsat
  Python 3.7, Windows 10, pyinstaller, winsound, no sound in executable kmarien 3 3,694 Nov-30-2020, 04:10 PM
Last Post: buran
  New to python, having trouble with an exercise Salkay 3 2,188 Feb-18-2020, 01:42 AM
Last Post: Salkay
  Cannot Change Python script to exe using Pyinstaller omar_mohsen 3 2,417 Dec-19-2019, 01:05 PM
Last Post: buran
  More Python Embedding Trouble jibarra 3 2,952 Jul-11-2019, 09:25 PM
Last Post: Gribouillis
  Making a generalised CSV COPY script in Python Sandy7771989 3 2,455 Jul-05-2019, 11:02 PM
Last Post: Larz60+
  Error with using pyinstaller to convert python script in Mac OS Takeshio 2 5,403 Oct-19-2018, 02:42 PM
Last Post: Takeshio
  Trouble making an argument optional linuxnoob 2 2,930 Aug-31-2018, 01:52 AM
Last Post: linuxnoob

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020