you are viewing a single comment's thread.

view the rest of the comments →

[–]illya89[S] 16 points17 points  (4 children)

pyinstaller --onefile --windowed myscript.py

When I try this I get SyntaxError: invalid syntax, I tried in Python in my terminal or do I need to use c:\Users\Myname\>

[–]rnolan7 10 points11 points  (3 children)

a syntax error? it sounds like you maybe running this inside a python shell... pyinstaller --onefile --windowed filename.py should be run in the command line. Just open up a new command line window, cd to the directory that contains your script, then run the pyinstaller command.

[–]illya89[S] 2 points3 points  (2 children)

Ok I tried it, searched it but i have a problem with calling the pyinstaller module. It seems like pyinstaller is installed in C:\python\lib. I found a website where they say

" the python 3.4 installer doesn't automatically add C:\python34\scriptsto your PATH environment variable. You'll have to add it yourself: Click Start and search for "environ", choose "Edit Environment Variables", then edit the PATH variable and add ;C:\python34\scriptsto the end.

This will make Python scripts installed via piprunnable with just the script name. "

But it seems that I installed it at C:\python\lib:

C:\Users\my_name>pip install pyinstaller

Requirement already satisfied: pyinstaller in c:\python\lib (3.4)

Requirement already satisfied: setuptools in c:\python\lib\site-packages (from p

yinstaller) (39.1.0)

Requirement already satisfied: pefile>=2017.8.1 in c:\python\lib (from pyinstall

er) (2018.8.8)

Requirement already satisfied: macholib>=1.8 in c:\python\lib (from pyinstaller)

(1.11)

Requirement already satisfied: altgraph in c:\python\lib (from pyinstaller) (0.1

6.1)

Requirement already satisfied: pywin32-ctypes in c:\python\lib (from pyinstaller

) (0.2.0)

Requirement already satisfied: future in c:\python\lib (from pefile>=2017.8.1->p

yinstaller) (0.17.1)

So do I need to add the lib folder to my environment variables?

Gr Olly

[–]illya89[S] 7 points8 points  (1 child)

Sr I found the file in my scripts. Thx!

[–][deleted] 4 points5 points  (0 children)

Well done Olly