• Re: How do you install a .whl file globally in debian without breaking

    From Darac Marjal@3:633/10 to All on Friday, July 10, 2026 21:10:02
    Subject: Re: How do you install a .whl file globally in debian without breaking system packages?


    On 10/07/2026 18:48, David Niklas wrote:
    Hello,
    I wanted to install a python pip wheel file globally without breaking my system packages. I tried searching online, but I cannot figure out how to
    do that.

    How do you install a .whl file globally in debian without breaking system packages?

    If you only have the wheel file, probably not much you can do. But if
    you have the original python repository, you can use "stdeb" to create a debian package for the library, that way you can specify the dependencies.

    Something like "sudo apt install debhelper dh-python python3-stdeb" then "python3 setup.py --command-packages=stdeb.command bdist_deb".

    YMMV.


    Thanks!



    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Norwid Behrnd@3:633/10 to All on Friday, July 10, 2026 22:50:01
    Subject: Re: How do you install a .whl file globally in debian without breaking system packages?

    Hello David

    On Fri, 10 Jul 2026 13:48:47 -0400
    David Niklas <deference@null.net> wrote:

    I wanted to install a python pip wheel file globally without breaking my system packages. I tried searching online, but I cannot figure out how to
    do that

    Two suggestions. For an installation which shall be available for weeks
    (for instance `date2name`), I usually run

    ``` bash
    pipx install date2name
    ```

    and then have the command `date2name` available everywhere (within my
    account). By `pipx list` I can see which version of Python supports the environment, then upgrade one or all pipx supported packages. See https://github.com/pypa/pipx

    Then there equally is `uv` which can collect the .whl from PyPI and execute in one command like, e.g.

    ``` bash
    uvx sp-repo-review[cli] ./local_python_project
    ```

    I prefer for the non-permanent deployment. The usual space cleaning goes by a `uv cache clean`, and once in a while a `uv cache prune` to prevent a too large deposit in `~/.cache/uv`. (Though one equally can request `uv` to permanently install a tool, too.) See https://docs.astral.sh/uv/guides/tools/

    Best regards,
    Norwid



    Best

    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Jan Claeys@3:633/10 to All on Monday, July 13, 2026 23:00:01
    Subject: Re: How do you install a .whl file globally in debian without breaking system packages?

    On Fri, 2026-07-10 at 13:48 -0400, David Niklas wrote:
    I wanted to install a python pip wheel file globally without breaking
    my system packages. I tried searching online, but I cannot figure out
    how to do that.

    How do you install a .whl file globally in debian without breaking
    system packages?

    Why do you think it will break system packages?

    Is it something that is also packaged in Debian?


    --
    Jan Claeys

    (please don't CC me when replying to the list)

    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Jan Claeys@3:633/10 to All on Tuesday, July 14, 2026 05:50:01
    Subject: Re: How do you install a .whl file globally in debian without breaking system packages?

    On Mon, 2026-07-13 at 20:32 -0400, David Niklas wrote:

    On Mon, 13 Jul 2026 22:45:33 +0200
    Jan Claeys <lists@janc.be> wrote:
    On Fri, 2026-07-10 at 13:48 -0400, David Niklas wrote:
    I wanted to install a python pip wheel file globally without
    breaking my system packages. I tried searching online, but I
    cannot figure out how to do that.

    How do you install a .whl file globally in debian without
    breaking system packages?

    Is it something that is also packaged in Debian?

    It's the VapourSynth package. And it's not in Debian -- though I
    could get it through the multimedia repo.

    In that case you are not going to break anything (except maybe other
    packages from the multimedia repo if you use those and if they depend
    on a different version of it).


    Why do you think it will break system packages?
    Because I get this big wall of scary text saying so...

    I suppose it?s written to sound scary because people did break thei
    r
    system in the past.

    The problems happen when you install newer versions of Python packages/modules/wheels/etc. that applications depend on, where the
    newer version does not have the same API, or where it behaves
    differently. It?s especially problematic when it?s a syste
    m utility
    written in Python that breaks that way.


    [?] You can override this, at
    the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed
    specification.

    It says here how to override the scary warning.

    Of course, if you don?t need the wheel installed globally then a
    virtual environment as others suggested might be possible too.


    --
    Jan Claeys

    (please don't CC me when replying to the list)

    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Darac Marjal@3:633/10 to All on Wednesday, July 15, 2026 22:20:01
    Subject: Re: How do you install a .whl file globally in debian without breaking system packages?


    On 14/07/2026 01:32, David Niklas wrote:
    (Sorry for not replying to everyone sooner, I seem to have been
    unsubscribed from the list -- or maybe the digests are taking >3 days to arrive.)

    On Mon, 13 Jul 2026 22:45:33 +0200
    Jan Claeys <lists@janc.be> wrote:
    On Fri, 2026-07-10 at 13:48 -0400, David Niklas wrote:
    I wanted to install a python pip wheel file globally without breaking
    my system packages. I tried searching online, but I cannot figure out
    how to do that.

    How do you install a .whl file globally in debian without breaking
    system packages?
    Is it something that is also packaged in Debian?
    It's the VapourSynth package. And it's not in Debian -- though I could
    get it through the multimedia repo.


    If it helps:

    ? uvx vapoursynth
    Installed 1 package in 62ms
    usage: vapoursynth [-h] COMMAND ...

    VapourSynth command line utility.

    options:
    ÿ -h, --helpÿ ÿ ÿ ÿ ÿ ÿshow this help message and exit

    commands:
    ÿ COMMAND
    ÿ ÿ configÿ ÿ ÿ ÿ ÿ ÿ ÿWrite or update the VapourSynth runtime
    configuration
    ÿ ÿ check-envÿ ÿ ÿ ÿ ÿ Show the current VapourSynth environment status
    ÿ ÿ get-vsscriptÿ ÿ ÿ ÿPrint the bundled VSScript library path
    ÿ ÿ get-includeÿ ÿ ÿ ÿ Print the bundled include directory
    ÿ ÿ get-pkgconfig-dirÿ Print the bundled pkgconfig directory
    ÿ ÿ get-plugin-dirÿ ÿ ÿPrint the bundled plugin directory
    ÿ ÿ register-installÿ ÿRegister the current installation in the user environment

    Examples:
    ÿ vapoursynth config
    ÿ vapoursynth check-env
    ÿ vapoursynth get-plugin-dir


    The same works if I run `pipx run vapoursynth`. PIPX (native python,
    slightly older) and UVX (rust, and a bit newer) both run applications
    directly from PyPI without installation (strictly, they install into a temporary virtual environment). If you find you use vapoursynth
    regularly, you can run either "pipx install vapoursynth" or "uv tool
    install vapoursynth" to get the tool added to your path.

    How much easier this query has become now you've told us which wheel
    you're trying to install. :)




    Why do you think it will break system packages?
    Because I get this big wall of scary text saying so...

    ########################################
    # pip install ./dist/vapoursynth-77-cp313-abi3-linux_x86_64.whl
    error: externally-managed-environment

    This environment is externally managed
    To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.13/README.venv for more information.

    note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the
    risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. ########################################

    Thanks



    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)