• venvs vs. package management (was: Terminal Emulator (Posting On Python

    From Peter J. Holzer@21:1/5 to Piergiorgio Sartor via Python-list on Sun May 19 08:49:06 2024
    On 2024-05-18 20:12:33 +0200, Piergiorgio Sartor via Python-list wrote:
    On 18/05/2024 20.04, Mats Wichmann wrote:
    So venvs make managing all that pretty convenient. Dunno why everybody's
    so down on venvs...

    Only people which are *not* using python... :-)

    In my experience, venvs is the only possible
    way to use python properly.

    That's very much depends on what you mean by properly.

    Personally, I use venvs a lot. But most of the reasons have more to do
    with team culture than technical constraints. In a different situation
    (e.g. if all our developers used Linux and preferrably the same version)
    I could see myself using venvs much less or maybe not at all.

    The dependency nightmare created by python, pip and all the rest
    cannot be resolved otherwise.

    That's what package management on Linux is for. Sure, it means that you
    won't have the newest version of anything and some packages not at all,
    but you don't have to care about dependencies. Or updates.

    (Missing packages can be a problem: Is there a script to automatically
    generate .deb packages from PyPI? I haven't looked recently ...)

    It seems backward compatibility is a taboo...

    I have recently written a script which checks out the newest version of
    the project, creates a fresh venv using a requirements.txt without
    version numbers and runs the test suite. If there is any action required (either because a test fails or because there is a newer version of any dependent package) it will create a ticket in redmine. Oh, and this
    script runs on a staging server which has the same Linux distribution
    (and hence the same Python version) as the production server.
    Seems to work, but that is only necessary because we are using venvs. If
    we relied on the distro's package management that would basically be a non-issue.

    hp

    --
    _ | Peter J. Holzer | Story must make more sense than reality.
    |_|_) | |
    | | | hjp@hjp.at | -- Charles Stross, "Creative writing
    __/ | http://www.hjp.at/ | challenge!"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmZJoN0ACgkQ8g5IURL+ KF1xTw/8COVqvYBzJ/w86YXtIvKMrz2nchE5sgfXvamwM4w7KWbs/9Xzqmfl8VCz 3wOLbReXXY9G3FJ79THZyOfS29WvZf+dZkRMN6CWZ0HaYsedJQ5I7cVx3pE5PsBv Cwqifi4wGuPJYXBpDpP6iN5YkpkWOy6S5rUhm7zU4KhwYMzpAukGi7aBo9I7JgX1 44Li7cDbQ8/lfYkWNl1jQLiuqomMjx+s+wC41bu17U4RpUoVSKb8rDq1jGnTLKrm W9lZkZ000+5olpgFeT1b7SgXlnkoNtzKX9noFUYWWTSMlTaCUHM9PetYP26gljx1 6G4oqon5gPL01weX6H1kSFn3OkiVPOViyGbZhLesq7HWoZK+4ZZLV82DXrI6P7CK t2HUWfsy5nisJkaC1pZaFblkvk6CsJXuDwwDZANoV/hN1QjlQegyQeHulSuK7ICD HFJ3MPNU1VGBphblT+9V+VPEK8B2kwr1HRj+yQfo5IOdziU5SYjGJOLjy1kudJi7 xsSFPmYRP4GiiED3aGKn4YvXBeBWt4Uu3aDL6NyRLNfrN6pZ2rBWRt7TL1Weo4y9 YiEz2wsAyhgqiZVMGzDqG2+pV8w4jCuzW7xjKqqwgSYMRv/xSwSPzjEpjnLX0Jlv +PuWrs4X2eZiOB+4ITiij/ptT7ypcApLjpZAnG9
  • From Piergiorgio Sartor@21:1/5 to Peter J. Holzer on Sun May 19 15:44:57 2024
    On 19/05/2024 08.49, Peter J. Holzer wrote:
    [...]
    That's what package management on Linux is for. Sure, it means that you
    won't have the newest version of anything and some packages not at all,
    but you don't have to care about dependencies. Or updates.

    Well, that doesn't work as well.
    Distributions do not pack everything, this
    also depending on licenses.

    Sometimes, or often, you need to use the
    *latest* version of something, due to some
    bugfix or similar.

    The distribution does not always keep up
    to date everything, so you're stuck.

    The only solution is a venv, with all
    needed packages for the given task.

    Typical problem with PyTorch / TensorFlow.

    In case of trouble, the first answer is:
    "Check with the latest (nightly) release".

    Which means installing something *outside*
    the Linux distribution support.
    And this impossible, because this will pull
    in dependencies like crazy, which are not
    (yet) in the Linux distribution path.

    Saying it differently, the latest greatest
    update is not a wish, it's a must...

    So, long story short, the only solution I
    know are venvs...

    Of course, other solutions are welcome!

    bye,

    --

    piergiorgio

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)