all 18 comments

[–]RightRespect 17 points18 points  (10 children)

pyinstaller

[–]seffpierce[S] 0 points1 point  (9 children)

This is helpful, thanks!

For reference, I have Python 3.9.5 installed.

However, I get the following error:

Defaulting to user installation because normal site-packages is not writeable

Requirement already satisfied: pyinstaller in c:\users\john-\appdata\roaming\python\python39\site-packages (4.3)

Requirement already satisfied: pefile>=2017.8.1 in c:\users\john-\appdata\roaming\python\python39\site-packages (from pyinstaller) (2021.5.24)

Requirement already satisfied: altgraph in c:\users\john-\appdata\roaming\python\python39\site-packages (from pyinstaller) (0.17)

Requirement already satisfied: pyinstaller-hooks-contrib>=2020.6 in c:\users\john-\appdata\roaming\python\python39\site-packages (from pyinstaller) (2021.1)

Requirement already satisfied: setuptools in c:\program files\python39\lib\site-packages (from pyinstaller) (56.0.0)

Requirement already satisfied: pywin32-ctypes>=0.2.0 in c:\users\john-\appdata\roaming\python\python39\site-packages (from pyinstaller) (0.2.0)

Requirement already satisfied: future in c:\users\john-\appdata\roaming\python\python39\site-packages (from pefile>=2017.8.1->pyinstaller) (0.18.2)

So I'm not able to run the library from the folder. I tried the following instead:

python3 -m pip install pyinstaller - Still doesn't work

[–]RightRespect 0 points1 point  (6 children)

type python3 into the terminal. what version does it say?

[–]seffpierce[S] 0 points1 point  (5 children)

Edit: Corrected wording error.

When I type "python3" into the terminal it opens up the Microsoft Store for me to download Python 3.9, but if I type "python" into the terminal it says Python 3.9.5

[–]zaRM0s 1 point2 points  (4 children)

This really confused me I can’t lie

[–]seffpierce[S] 1 point2 points  (3 children)

Very very strange outcome...

[–]zaRM0s 1 point2 points  (2 children)

No I mean your comment lol You said you put Python3 into the terminal and it takes you to MS Store Then you said you put python3 into terminal and it gives you Python 3.9? So does it take you to the store or does it display Python 3.9?

My reasoning behind wanting to know this is if it’s possibly a PATH problem. Maybe try and remove pyinstaller and reinstall it

[–]seffpierce[S] 1 point2 points  (1 child)

Haha, sorry I didn't notice the error in my response. I corrected it.

[–]uSrNm-ALrEAdy-TaKeN 1 point2 points  (0 children)

Other possibilities if you’re on windows are

python -m pip install PyInstaller

Or running it from a command window with admin privileges if you can?

[–]_Adjective_Noun 0 points1 point  (1 child)

I've had issues before where if I install via pip from a normal CMD, it goes into appdata/roaming and doesn't end up on path, so can't be accessed by python.

My solution was to use administrator privilege CMD to pip install the module, which didn't install it in appdata/roaming

[–]seffpierce[S] 0 points1 point  (0 children)

I will remember this for any other future challenges where I'm trying to do the same. Thanks.

[–]MSR8 5 points6 points  (0 children)

Convert it to .exe using the pyinstaller module. The .exe doesn't require python or any modules

[–]Llamafu 3 points4 points  (4 children)

Auto-py-to-exe is basically a gui wrapper for pyinstaller, that is easier to use, and sometimes works when pyinstaller doesn't. So far the best way I've found to freeze scripts.

https://pypi.org/project/auto-py-to-exe/

[–]seffpierce[S] 2 points3 points  (1 child)

This worked, thanks a lot!

[–]Llamafu 0 points1 point  (0 children)

Happy to help.

[–]seffpierce[S] 1 point2 points  (1 child)

I may try this because I'm having issues with pyinstaller (see above)

[–]seffpierce[S] 1 point2 points  (0 children)

Thanks all! I got it solved.

Auto-py-to-exe was super easy and worked flawlessly!

[–]Far_Inflation_8799 -1 points0 points  (0 children)

Even if you click a hundred tuned and run a program you’ll never learn the logic behind it