Re: Using pipx for packages as opposed to applications

Liste des GroupesRevenir à cl python 
Sujet : Re: Using pipx for packages as opposed to applications
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.python
Date : 12. Jan 2025, 10:54:35
Autres entêtes
Organisation : Stefan Ram
Message-ID : <pipx-20250112105347@ram.dialup.fu-berlin.de>
References : 1
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.



Date Sujet#  Auteur
11 Jan 25 * Using pipx for packages as opposed to applications10Chris Green
12 Jan 25 +- Re: Using pipx for packages as opposed to applications1Stefan Ram
12 Jan 25 +- Re: Using pipx for packages as opposed to applications1Left Right
12 Jan 25 +* Re: Using pipx for packages as opposed to applications4Stefan Ram
12 Jan 25 i+* Re: Using pipx for packages as opposed to applications2Chris Green
13 Jan 25 ii`- Re: Using pipx for packages as opposed to applications1Thomas Passin
12 Jan 25 i`- Re: Using pipx for packages as opposed to applications (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
13 Jan 25 +- Complete working version of cython Queue example?1Henry S. Thompson
13 Jan 25 +- Re: Complete working version of cython Queue example?1Henry S. Thompson
13 Jan 25 `- Re: Complete working version of cython Queue example?1Thomas Passin

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal