• Using pipx for packages as opposed to applications

    From Chris Green@21:1/5 to All on Sat Jan 11 21:54:32 2025
    Can one use pipx to wrap the process of creating an independent
    environment for a python package as opposed to a runnable application?

    E.g. I want to install and use pksheet but, as it's not available from
    the Debian repositories, I'll have to install it from PyPi. So I
    should put it in its own environment. Can pipx help me with this?

    --
    Chris Green
    ยท

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Chris Green on Sun Jan 12 09:54:35 2025
    Chris Green <cl@isbd.net> wrote or quoted:
    Can one use pipx to wrap the process of creating an independent
    environment for a python package as opposed to a runnable application?

    .---------------------------------------------------------------.
    | Heads up, I haven't put this advice through its paces myself, |
    | so take it with a grain of salt! |
    '---------------------------------------------------------------'

    Yo, pipx is really more for setting up and running Python CLI
    apps in their own little bubbles, not so much for creating
    separate playgrounds for regular Python packages. But hey,
    you can still use pipx to kind of sorta get what you want with
    pksheet, even if it's not your typical command-line deal.

    Here's the lowdown on using pipx for pksheet:

    1. Drop pksheet in with pipx:

    bash

    pipx install pksheet

    This bad boy will whip up a special spot just for pksheet and
    plop it in there.

    2. To rock pksheet in your Python scripts, you can run it through
    pipx like this:

    bash

    pipx run pksheet your_script.py

    This move will fire up your script using the pksheet setup in
    its own little world.

    Now, while this trick works, it's not exactly smooth sailing for
    everyday package use. For non-CLI packages like pksheet, you're
    better off sticking to the old-school virtual environment tools:

    1. Whip up a virtual environment:

    bash

    python3 -m venv pksheet_env

    2. Jump into that environment:

    bash

    source pksheet_env/bin/activate

    3. Grab pksheet:

    bash

    pip install pksheet

    4. Now you're golden to use pksheet in your Python scripts within
    this environment.

    To wrap it up, pipx can technically handle pksheet, but it's really
    more at home with CLI apps. For your run-of-the-mill Python packages,
    cooking up a dedicated virtual environment is the way to go.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Chris Green on Sun Jan 12 10:26:17 2025
    Chris Green <cl@isbd.net> wrote or quoted:
    E.g. I want to install and use pksheet but, as it's not available from
    the Debian repositories, I'll have to install it from PyPi.

    I can't dig up any "pksheet" on PyPI. So, you got to take
    my earlier response like a rumor from a random tech meetup in
    Palo Alto - sounds interesting, but needs serious verification.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Green@21:1/5 to Stefan Ram on Sun Jan 12 12:11:22 2025
    Stefan Ram <ram@zedat.fu-berlin.de> wrote:
    Chris Green <cl@isbd.net> wrote or quoted:
    E.g. I want to install and use pksheet but, as it's not available from
    the Debian repositories, I'll have to install it from PyPi.

    I can't dig up any "pksheet" on PyPI. So, you got to take
    my earlier response like a rumor from a random tech meetup in
    Palo Alto - sounds interesting, but needs serious verification.

    Ah, oops, a typo. It's pysheet (I have pk on the brain from it being
    Point Kilometrique, distance markers on canals in France).

    Thanks for your previous response, it told me what I needed to know,
    that pipx isn't really going to do what I want particularly easily.


    If I DIY an environment for pysheet and then develop some python that
    uses it, how do I then make it accessible as a 'normal' program? This
    is just for my own use by the way, on (probably) just a couple of
    Linux systems.

    --
    Chris Green
    ยท

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Stefan Ram on Sun Jan 12 22:42:52 2025
    On 12 Jan 2025 10:26:17 GMT, Stefan Ram wrote:

    I can't dig up any "pksheet" on PyPI. So, you got to take my earlier
    response like a rumor from a random tech meetup in Palo Alto - sounds interesting, but needs serious verification.

    More of a fill-in-the-blanks type of response, shall we say?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Chris Green via Python-list on Mon Jan 13 13:15:49 2025
    On 1/12/2025 7:11 AM, Chris Green via Python-list wrote:
    Stefan Ram <ram@zedat.fu-berlin.de> wrote:
    Chris Green <cl@isbd.net> wrote or quoted:
    E.g. I want to install and use pksheet but, as it's not available from
    the Debian repositories, I'll have to install it from PyPi.

    I can't dig up any "pksheet" on PyPI. So, you got to take
    my earlier response like a rumor from a random tech meetup in
    Palo Alto - sounds interesting, but needs serious verification.

    Ah, oops, a typo. It's pysheet (I have pk on the brain from it being
    Point Kilometrique, distance markers on canals in France).

    Thanks for your previous response, it told me what I needed to know,
    that pipx isn't really going to do what I want particularly easily.


    If I DIY an environment for pysheet and then develop some python that
    uses it, how do I then make it accessible as a 'normal' program? This
    is just for my own use by the way, on (probably) just a couple of
    Linux systems.

    Create a launch script that sets the environmental variables and
    launches the program.

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