Sujet : Re: Strategies for avoiding having to use --break-system-packages with pip
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.pythonDate : 14. Jan 2025, 12:43:19
Autres entêtes
Organisation : Stefan Ram
Message-ID : <pip-20250114124218@ram.dialup.fu-berlin.de>
References : 1
Chris Green <
cl@isbd.net> wrote or quoted:
What are my options?
You've got a few ways to skin this cat without turning your Debian
setup into a dumpster fire.
Virtual environment route:
This is your best bet for keeping things kosher. Here's the lowdown:
bash
python3 -m venv ~/myenv
source ~/myenv/bin/activate
pip install tkintertable
To make your program run smooth as butter, whip up a shell script
that fires up the virtual environment and kicks off your program:
bash
#!/bin/bash
source ~/myenv/bin/activate
python /path/to/your/program.py
Slap that bad boy in your PATH, make it executable, and you're
golden.
Source installation:
Pulling tkintertable from git and tweaking your PYTHONPATH is
solid. It's like growing your own organic produce - more work,
but you know what you're getting.
Pip with --break-system-packages:
It's like jaywalking - you might get away with it, but one day
you could end up in a world of hurt.
DIY Debian package:
For the overachievers out there. It's like building your
own surfboard - cool if you can pull it off, but not for
the faint of heart.
Bottom line:
The virtual environment play (option 1) is your ticket to ride.
It keeps your system clean as a whistle while letting you run
your program without breaking a sweat.