Post by Chris GreenCan 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.