Pyinstaller with Virtual Environments (venv)
In this Python tutorial, we will discuss how to optimize your Pyinstaller EXE's using Virtual Environments. We will be using the "venv" library to create the Virtual environment for Pyinstaller.
Command Prompt (Windows): tutorial\Scripts\activate.bat
Windows PowerShell: tutorial\Scripts\Activate.ps1
Linux (Bash): tutorial\bin\activate
Note: For VS Code users, "tutorial\Scripts\activate.bat" might not work. (Doesn't work for me). So leave out the ".bat" extension and try it again (until the virtual environment name appears in the start).
Website Link:
coderslegacy.com/pyinstaller-...
Related Links:
UPX Tutorial -
Пікірлер: 17
I was trying the same thing since last 56 hours, but the problem was versions of libraries Love you
Perfect video, thank you so much. I got lots of packages installed so my graduation_project.exe was 144MB, with your venv help I made it to 24 MB. You're awesome!
@coderslegacy5661
Жыл бұрын
Glad to hear that!
Max thumbs up to an excellent video. thanks
Thank you, really. You're awesome
I love you! You saved my life with this video! I hope all your dreams come true and all the women in the world will crave you!!!!!
Very helpfull
So with auto-py-to-exe you can implement venv to your exe too?
Thanks bro.. reduced 700 mb to 48 mb
Auto-Py-To-Exe makes your life easier
@WilkenPerez
10 ай бұрын
Yeah, but, it just initialize... didn't work for me... :(
like it 😀
"venv tutorial" did nothing
11:48 the title of the video
This is so annoying. Every video is like this: SyntaxError: invalid syntax >>> -m venv tutorial2 File "", line 1 -m venv tutorial2 ^^^^ SyntaxError: invalid syntax >>>
@coderslegacy5661
10 ай бұрын
Looks like you are executing these commands in the python interpreter. Turn it off first, then run the following command: python -m venv tutorial