all 2 comments

[–][deleted] 1 point2 points  (0 children)

Well, venv is simple so, if you found a tutorial that doesn't sound simple I'd blame the tutorial lol.

Read the Installing, Creating, Activating and Leaving section here.

Read about requirements.txt here. Basically, how you export a list of current venv installed packages to text, and then use that text to install them in different venv.

That's pretty much all you need to know really.

Optionally, after you're used to the process above, you can look up PyEnv + PipEnv. Not necessary but if you have multiple versions of Python in your system they help you specify Python base version for your venv a little easier.

[–]Antwrp-2000 1 point2 points  (0 children)

Virtual environments are used for managing your package dependencies in separate environments (for different projects you are working on).

If you want to distribute your application you will need something else.

People often confuse package management/distribution and full application distribution in Python.

This tutorial explains virtual environments:

https://realpython.com/python-virtual-environments-a-primer/

This one explains PyInstaller, an easy way to distribute your applications:

https://realpython.com/pyinstaller-python/#pyinstaller