Python virtual environment

Regarding the topic below:

When a developer distributes a python application that requires certain levels of python modules, is it up to the end user to then create (pip or pacman) the python virual environment and run the python app in that environment?

Can a python application be statically linked to make it easier on the end user?

PS: I created a new topic rather than adding to the above, because the topic was solved and this topic was rather a question about the solution. It seemed like the right thing to do :slight_smile:

Yes … except I think you are missing the distinction.
System packages for system. (pacman [preferred] or pip)
Development stuff in a virtual environment (pip)
(this way they dont break eachother)

https://wiki.archlinux.org/title/Python#Package_management

3 Likes

Adding a requirements.txt in your project is a recognized method of describing your projects dependencies.

In a virtual environment you you can feed the requirements.txt to pip and get the app working quickly.

You can see an example in one of my repos GitHub - fhdk/python-118dk: phonebook utilizing danish official danish phone registry

3 Likes