Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #231: We had to turn off that service to comply with the CDA Bill.


comp / comp.lang.python / Re: Strategies for avoiding having to use --break-system-packages with pip

SubjectAuthor
* Strategies for avoiding having to use --break-system-packages with pipChris Green
+- Re: Strategies for avoiding having to use --break-system-packages with pipStefan Ram
+- Re: Strategies for avoiding having to use --break-system-packages with pipMats Wichmann
+- Re: Strategies for avoiding having to use --break-system-packages with pipc.buhtz
+- Re: Strategies for avoiding having to use --break-system-packages with pipThomas Passin
`- Re: Strategies for avoiding having to use --break-system-packages with pipLeft Right

1
Subject: Strategies for avoiding having to use --break-system-packages with pip
From: Chris Green
Newsgroups: comp.lang.python
Date: Tue, 14 Jan 2025 11:32 UTC
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: cl@isbd.net (Chris Green)
Newsgroups: comp.lang.python
Subject: Strategies for avoiding having to use --break-system-packages with pip
Date: Tue, 14 Jan 2025 11:32:35 +0000
Lines: 43
Message-ID: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net PEPiIML/TExwuocGXGql5gJSDjVdp8di3tFcyyGxziVzQnkbE=
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:ViBbD5aWH4vCqylXDgRqdOrZXnU= sha256:/4w0nUGc59D3sqEiw7YTc8KxDlye69moUpL1vhzhNeA=
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-28-amd64 (x86_64))
View all headers

I have a (relatively) clean Debian 12 installation running on my two
workhorse systems, a desktop server at home and my laptop that travels
around with me.

I moved from Xubuntu to Debian on both these systems a few months ago.

I ran Xubuntu for many years and acquired a whole lot of python
packages installed with pip, as root. For the last couple of years I
had to use the --break-system-packages option to get things installed.

As far as I'm aware I never hit any dependency problems doing this.
It's probably because things I installed with pip were mostly quite
small, specialised, packages that I used in just one or two utility
programs that I had written myself. In quite a few cases these were
realated to image processing and such things.

So far I've managed to keep my Debian 12 installations 'pip free', I
haven't even got pip installed. However I may have just come across
something that would at least be very useful and it comes from PyPi.
(It's tkintertable if that's of any interest or relevance)

What are my options?

Just install it using pip as root and --break-system-packages,
what's likely to break?

Use a virtual environment, what do I have to do then to make using
my program (that uses tkintertable) 'transparent', i.e. I just
want to be able to run the program from the command prompt like
any other program.

Download tkintertable from git into my development environment and
use that. My PYTHONPATH will need to point to it but I can't see
any further issues with doing this.

Anything else? As far as I can see using pipx doesn't help me at
all (see recent thread here).

--
Chris Green
·

Subject: Re: Strategies for avoiding having to use --break-system-packages with pip
From: Stefan Ram
Newsgroups: comp.lang.python
Organization: Stefan Ram
Date: Tue, 14 Jan 2025 11:43 UTC
References: 1
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: Strategies for avoiding having to use --break-system-packages with pip
Date: 14 Jan 2025 11:43:19 GMT
Organization: Stefan Ram
Lines: 52
Expires: 1 Jan 2026 11:59:58 GMT
Message-ID: <pip-20250114124218@ram.dialup.fu-berlin.de>
References: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de fslVjnObJe7GPC3wZzPRQwKPELMTEL4aoNgC9KF2ZNzMh4
Cancel-Lock: sha1:MPIFgnVc/7GtjCtYGqnPr5Rh/Y4= sha256:Pe4lHAnioMrqFJlMRIbwUk8KBYPhTo4E9MjrVKOmNo0=
X-Copyright: (C) Copyright 2025 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
View all headers

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.

Subject: Re: Strategies for avoiding having to use --break-system-packages with pip
From: Mats Wichmann
Newsgroups: comp.lang.python
Date: Tue, 14 Jan 2025 16:06 UTC
References: 1 2
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: mats@wichmann.us (Mats Wichmann)
Newsgroups: comp.lang.python
Subject: Re: Strategies for avoiding having to use --break-system-packages
with pip
Date: Tue, 14 Jan 2025 09:06:06 -0700
Lines: 57
Message-ID: <mailman.74.1736870769.2912.python-list@python.org>
References: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
<8c110143-0ecd-445b-84bb-d46b0254bbfb@wichmann.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de DePoS2oBZ0+kzC5cos/V9gG6vPD3FZbcoebrHWbG8jJA==
Cancel-Lock: sha1:e7PY0AqLcOrsW4k03PYTI0Lc6U4= sha256:2WFpZSmNoF615rC01D7vByzDiM+mxYiGMgN5/rsKbDA=
Return-Path: <mats@wichmann.us>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=messagingengine.com header.i=@messagingengine.com
header.b=qFiBAMdx; dkim-adsp=none (unprotected policy);
dkim-atps=neutral
X-Spam-Status: OK 0.002
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'pip': 0.04; 'thread':
0.05; 'acquired': 0.09; 'debian': 0.09; 'environment,': 0.09;
'git': 0.09; 'moved': 0.09; 'myself.': 0.09; 'subject:packages':
0.09; 'utility': 0.09; 'well:': 0.09; 'that.': 0.15; 'command.':
0.16; 'declare': 0.16; 'else?': 0.16; 'executable': 0.16;
'installed.': 0.16; 'invoke': 0.16; 'pip,': 0.16; 'pypi.': 0.16;
'received:10.202': 0.16; 'received:10.202.2': 0.16;
'received:internal': 0.16; 'received:messagingengine.com': 0.16;
'root.': 0.16; 'subject:pip': 0.16; 'virtualenv': 0.16; 'wrote:':
0.16; 'python': 0.16; 'probably': 0.17; "can't": 0.17; 'uses':
0.19; 'to:addr:python-list': 0.20; 'option': 0.20; 'written':
0.22; "i've": 0.22; 'i.e.': 0.22; 'ran': 0.22; "what's": 0.22;
'install': 0.23; 'command': 0.23; 'installed': 0.23; 'laptop':
0.23; 'run': 0.23; 'anything': 0.25; 'cover': 0.26; 'chris': 0.28;
'mostly': 0.28; 'environment': 0.29; 'whole': 0.30; 'header:User-
Agent:1': 0.30; 'packages': 0.31; 'program': 0.32; "doesn't":
0.32; 'python-list': 0.32; 'but': 0.32; 'subject:for': 0.32;
"i'm": 0.33; 'there': 0.33; 'script': 0.33; 'server': 0.33;
'header:In-Reply-To:1': 0.34; 'able': 0.34; 'running': 0.35;
'words': 0.35; 'months': 0.35; 'this.': 0.35; 'cases': 0.36;
'image': 0.36; 'those': 0.36; 'couple': 0.37; "skip:' 10": 0.37;
'using': 0.37; "it's": 0.37; 'put': 0.38; 'both': 0.38; 'use':
0.39; 'two': 0.39; "that's": 0.39; 'quite': 0.39; 'least': 0.39;
'single': 0.39; 'prompt': 0.39; '(see': 0.40; 'program.': 0.40;
'something': 0.40; 'want': 0.40; 'likely': 0.61; 'come': 0.62;
'me.': 0.64; 'your': 0.64; 'url-ip:172.67/16': 0.64; 'ago.': 0.64;
'look': 0.65; 'years': 0.65; 'further': 0.69; 'small,': 0.69;
'interest': 0.70; 'desktop': 0.70; 'virtual': 0.71; 'article':
0.73; '(that': 0.84; 'subject: \n ': 0.84; 'subject:Strategies':
0.84; 'travels': 0.84; 'received:103': 0.91; 'green': 0.96
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wichmann.us; h=
cc:content-transfer-encoding:content-type:content-type:date:date
:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:subject:subject:to:to; s=2018-07.pbsmtp; t=
1736870767; x=1736957167; bh=a2mxV9i2nJvc/N1EZWP9tESIYq7yb7X7LeQ
VwWF7T6A=; b=jQDqK1GOfj2lGI3UaPwqbLXjRPH8aNT/qGnb3vt9N7CnSXN9TD7
+mYSAgajPLNyuqEpWbHTgT6v4XXbwIcZNt/Nkc8SfOC+hrpsVtLyUuJ3i/5HMOnQ
EUmwTJKErFhDGuO29LEdUF3eRrf+s46nS1we0x4q4KrCFUJLLm6tALFg=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:content-transfer-encoding:content-type
:content-type:date:date:feedback-id:feedback-id:from:from
:in-reply-to:in-reply-to:message-id:mime-version:references
:reply-to:subject:subject:to:to:x-me-proxy:x-me-sender
:x-me-sender:x-sasl-enc; s=fm2; t=1736870767; x=1736957167; bh=a
2mxV9i2nJvc/N1EZWP9tESIYq7yb7X7LeQVwWF7T6A=; b=qFiBAMdxm2jbfpL6j
UTDB3s7icW/CdZIuimlyiaVmXmyiJSvtADAUmJ8dR9zWgo2RI2txBVxRep01MP3K
lZMzTBYPdmbuu18G++vZ6SkpuB2T61G1s/30xOPF4kMqnAey4/NHwBXRvXC5d0zQ
ttKjuhdKHr+WzeBwC8eRAiNMz0QEhDGpHwaSQ655BAo4VSMylQb/YiHcxucQdS2D
CyS0c6bnsJ3T5ECDqdsmYVnO5MYCm4OOEBLYXf08Zcrnt7QmfN9biTMaxGIlME34
GNJS3r+kq2WQiRxtqI0d2Bt/siI0EG/O0sTm0bKy6VPcEm++VcNteRI9+M5FNEeh
f1svA==
X-ME-Sender: <xms:b4uGZ0ob3DphGYWlRWf2rPHH6toTTuJg9NhqiK4Nwj0OAUgqCjTUwg>
<xme:b4uGZ6o2amxeFwhoncnsOJOj81FjqgTC07tFqNH0FS7thKulwv3NO3mvgA2lBH2BM
lHKUBMFBFYhRSs7QBc>
X-ME-Received: <xmr:b4uGZ5Nabl5BkBTiG-1B7LS_rT47tgwYjY482Ws08xpSLTHFLHQRXMThBBxJr_i3sHpm4YWKORxGwpoNMx8AP9Kpg_LKJyC4Ig>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudehiedgkeegucetufdoteggodetrfdotf
fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfg
fuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeforghtshcuhghitghhmhgrnhhn
uceomhgrthhsseifihgthhhmrghnnhdruhhsqeenucggtffrrghtthgvrhhnpeevtedvgf
eigeevjeejudehkeetkeekueevkeeuudefkeefteeuudeukeduuedvteenucffohhmrghi
nheprghsthhrrghlrdhshhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh
grihhlfhhrohhmpehmrghtshesfihitghhmhgrnhhnrdhushdpnhgspghrtghpthhtohep
uddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphihthhhohhnqdhlihhsthesph
ihthhhohhnrdhorhhg
X-ME-Proxy: <xmx:b4uGZ74OxJhm3GmpygsPI1XxWqJFUok9zyjBQjBP8JCgfpG_gAc4aw>
<xmx:b4uGZz6_JMgO_V1m6MAeYBipQTTJtJzF09Ue8Wh2R68weCHFKr7wlA>
<xmx:b4uGZ7i9hc3RL4UEubDktJ7CbUPRa6KAz1KtehPsNQ-6RX3tITvXgg>
<xmx:b4uGZ96oopIAzbe3S0ojxEut-4q5gxN-aggZCmNe0ru7OJk2LhYt8A>
<xmx:b4uGZwgXB0PaYPny9hANg9zSfRO9LZtWX2-oLZJJ4W75nRsWO51HQQ_l>
Feedback-ID: i387144f0:Fastmail
User-Agent: Mozilla Thunderbird
Content-Language: en-US
Autocrypt: addr=mats@wichmann.us; keydata=
xsDiBD9xp6oRBAC1vd3YI8Gcr1CxpV1gldNQu0uQsNaICDk+Ai3+R163s/P83JOYG+SBEA3P
v7iZx70qpQ3RzP7KrjF1Nm6j0em9ccUX2fPQUCAxXw5Hiq7CSMiwQQZRI6shcnyMh9XTKViT
WK5MrKDyvjDEn7epjKzKwPS5SG039l6XaOKU0A4uGwCgsNqUQqC0gMMcbKlJV8ql58iKmbMD
/ii8FPQrXmyS/FnsPs7UddV5qMHKm7NUH5oiKuMVyakInRyq9iIxuu3D4Ec6mWRKcGsjmIkW
HXCSz0aefs6dsqNqpU54cYioJ3wP5LzHK7oclgJPryVt5Qezbdutf8SQf8gVkaNIlkxwGUzi
bKTZ6CHzwlz9nNgeel0XPUcZzFxGA/4paeCg2rMSVuAhUQbsLYHu4XzTs9P16zaXkrtxc4m5
b+BF5xsLgTpyO5l859XudS2Gp+7/Y37dAU4QlyGGOboWmF1y9U5DnzBwG8ghsnym+ga58MJh
LdRdQQ6xQolCpEXOuzm40f2r5uMxF3KOJ7WpIPuGAkeCPru9BmlATH+zOs0gTWF0cyBXaWNo
bWFubiA8bWF0c0B3aWNobWFubi51cz7CYQQTEQIAIQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIX
gAUCT0VyZwIZAQAKCRDAMaCQc9hUxiZBAJ9cWziGp7hVfsu5T+cQptc3rLNndQCgrZh8u5LW
BfJ5e/Y+3PwZ8UEm+ELOwE0EP5is8BAEAMtwzcA8TYf5UTjDMgwcSNoErTc9ag+IX05QFgL8
aF8sfJRv5atcitqQy0gSIsOzI+L/AFdPN/+QQI3dL1tCq14t32KPDtigDhzm6jVPXX5z+V9u
xnD8XTp+ZvNcWoHXjViM8aXeLLEiCpiVCho307h3XShvqoKINWRQWeAsKKDDAAMFA/48zaey
wiiEyvI0meJ1KkNHxdLP0yLODr1WV6j9xkPkLWOaIDw7dlwEOlF1N1YtZ2wa0p1wsttdIbIx
ffgwXmcH4zrdxUIMz3U0BqYzk5H+5cYFXECXTFVOmweS+JECYMj80PjRoKCO1eVO1N30zksB
36NnhZWPRWIhjK3ZarIYH8JGBBgRAgAGBQI/mKzwAAoJEMAxoJBz2FTG6VEAoKDYHfDp5Q3q
PuPvPahCE9HsXMgAAJ9INTqcLSJrOfyJ8q95nBO1T26H2Q==
In-Reply-To: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <8c110143-0ecd-445b-84bb-d46b0254bbfb@wichmann.us>
X-Mailman-Original-References: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
View all headers

On 1/14/25 04:32, Chris Green via Python-list wrote:
> I have a (relatively) clean Debian 12 installation running on my two
> workhorse systems, a desktop server at home and my laptop that travels
> around with me.
>
> I moved from Xubuntu to Debian on both these systems a few months ago.
>
> I ran Xubuntu for many years and acquired a whole lot of python
> packages installed with pip, as root. For the last couple of years I
> had to use the --break-system-packages option to get things installed.
>
> As far as I'm aware I never hit any dependency problems doing this.
> It's probably because things I installed with pip were mostly quite
> small, specialised, packages that I used in just one or two utility
> programs that I had written myself. In quite a few cases these were
> realated to image processing and such things.
>
>
> So far I've managed to keep my Debian 12 installations 'pip free', I
> haven't even got pip installed. However I may have just come across
> something that would at least be very useful and it comes from PyPi.
> (It's tkintertable if that's of any interest or relevance)
>
>
> What are my options?
>
> Just install it using pip as root and --break-system-packages,
> what's likely to break?
>
> Use a virtual environment, what do I have to do then to make using
> my program (that uses tkintertable) 'transparent', i.e. I just
> want to be able to run the program from the command prompt like
> any other program.
>
> Download tkintertable from git into my development environment and
> use that. My PYTHONPATH will need to point to it but I can't see
> any further issues with doing this.
>
> Anything else? As far as I can see using pipx doesn't help me at
> all (see recent thread here).

You might look at uv, which makes the managing of a virtualenv for your
program pretty transparent. You declare your dependencies, and then just:

uv run myscript.py

And of course if you don't want to type three words to launch, you can
put those in an executable shell script in your path, and invoke it with
a single command.

There was a nice article on this somewhere which I now can't find, but
the project docs cover the topics pretty well:

https://docs.astral.sh/uv/guides/scripts

Subject: Re: Strategies for avoiding having to use --break-system-packages with pip
From: c.buhtz@posteo.jp
Newsgroups: comp.lang.python
Date: Tue, 14 Jan 2025 16:09 UTC
References: 1 2
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: c.buhtz@posteo.jp
Newsgroups: comp.lang.python
Subject: Re: Strategies for avoiding having to use --break-system-packages
with pip
Date: Tue, 14 Jan 2025 16:09:16 +0000
Lines: 18
Message-ID: <mailman.75.1736871344.2912.python-list@python.org>
References: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
<c30dc116665722c330b43c23ad6bf653@posteo.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de oQB8N65PPQE/qWqL5qs9EgnImOK2fV4sPXzhMyQdD47A==
Cancel-Lock: sha1:4/On9/v/kDyqdfXfvudOD/Yby3I= sha256:dxxWDrtL4LWDtlYrufmM/u5N5YxA7fopH8uLiwq/aIs=
Return-Path: <c.buhtz@posteo.jp>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=posteo.jp header.i=@posteo.jp header.b=cWWJR/lb;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.027
X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'yet.': 0.04; 'repository':
0.05; '"new': 0.09; 'example.': 0.09; 'subject:packages': 0.09;
'gnu/linux': 0.16; 'subject:pip': 0.16; 'python': 0.16;
'applications': 0.17; 'to:addr:python-list': 0.20; 'install':
0.23; 'received:de': 0.23; 'environment': 0.29; 'packages': 0.31;
'official': 0.32; 'christian': 0.32; 'but': 0.32; 'subject:for':
0.32; 'header:In-Reply-To:1': 0.34; 'package': 0.34; 'way': 0.38;
'still': 0.40; 'try': 0.40; 'should': 0.40; 'similar': 0.63;
'me.': 0.64; 'your': 0.64; 'virtual': 0.71; 'received:185': 0.71;
'subject: \n ': 0.84; 'subject:Strategies': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.jp; s=2017;
t=1736870957; bh=ABiSqddKjzoqKU3fpDAI0DDezbvGWx24qR/HI93/tFE=;
h=MIME-Version:Date:From:To:Subject:Message-ID:Content-Type:
Content-Transfer-Encoding:From;
b=cWWJR/lbANfrzmGih++CU4pZFUmT8ORx/dkAVCpW7KYkvv0uUMSYOgCbA1EPTLqMA
rBu0VugyFdBHGvFZT6Un0b4+hRUqKecfmANCn5uGqx9dcMGNtwqNOiUlu7MpM4IJdv
Zb4O2YdiaDJXDkXpmxzOO76MwrRi6AmICk4a2IpQI2jLvLYWlyvnZWFNdsZOvwRgc8
4b6zer/nalEOvzSz+OBsFTGXHuh3iGqR+nAHEqKSsTvvAptD9GGCb2wtc2aSnaF6LC
Xk9aptF+MGPeGMSpN0v7rgM/6X2z1RbuhjBrFCA43QWVJA3U/16KYM1O9XJv7TVhBD
5clZcjttXnwyg==
In-Reply-To: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <c30dc116665722c330b43c23ad6bf653@posteo.de>
X-Mailman-Original-References: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
View all headers

Hello Chris,

I do have similar "problems" and still try to get used to the "new way".

Other might correct me. I am not sure yet.

To my current understanding the way to go is to install Python
applications via "pipx". That make the application available in your
system but also isolate it in its own virtual environment. Of course you
should prefer to install applications from your GNU/Linux distros
official repository if available.

If you install a Python package (library, not an application) you should
create your own Python environment via venv for example. Pipx is not
intended to install Python packages that are not applications.

Regrads,
Christian

Subject: Re: Strategies for avoiding having to use --break-system-packages with pip
From: Thomas Passin
Newsgroups: comp.lang.python
Date: Tue, 14 Jan 2025 16:36 UTC
References: 1 2
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: list1@tompassin.net (Thomas Passin)
Newsgroups: comp.lang.python
Subject: Re: Strategies for avoiding having to use --break-system-packages
with pip
Date: Tue, 14 Jan 2025 11:36:34 -0500
Lines: 61
Message-ID: <mailman.77.1736877232.2912.python-list@python.org>
References: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
<a81ae072-9857-4c85-a3fb-0d678fbc6cea@tompassin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de EMUnxRQFYh/omDkuycGDRQXLtuFn3W0mKtwhrKYzohPg==
Cancel-Lock: sha1:SOQzYAMfXTOxs0SGQRQZeXZlNec= sha256:aoofAVCpg5BoUSer6A/QCBarVJg2XzNZ1pyJRX4BY5w=
Return-Path: <list1@tompassin.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=tompassin.net header.i=@tompassin.net header.b=BHZEMiCl;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.005
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'pip': 0.04; '3.8': 0.05;
'thread': 0.05; 'happened': 0.07; 'acquired': 0.09; 'debian':
0.09; 'environment,': 0.09; 'git': 0.09; 'moved': 0.09; 'myself.':
0.09; 'sometimes,': 0.09; 'subject:packages': 0.09; 'utility':
0.09; 'problem.': 0.15; 'that.': 0.15; '--user': 0.16; 'else?':
0.16; 'installed.': 0.16; 'pip,': 0.16; 'pypi.': 0.16;
'received:10.0.0': 0.16; 'received:64.90': 0.16;
'received:64.90.62': 0.16; 'received:64.90.62.162': 0.16;
'received:dreamhost.com': 0.16; 'root.': 0.16; 'subject:pip':
0.16; 'wrote:': 0.16; 'python': 0.16; 'probably': 0.17; "can't":
0.17; 'solve': 0.19; 'uses': 0.19; 'to:addr:python-list': 0.20;
'option': 0.20; 'written': 0.22; "i've": 0.22; 'i.e.': 0.22;
'ran': 0.22; "what's": 0.22; 'version': 0.23; 'install': 0.23;
'command': 0.23; 'installed': 0.23; 'laptop': 0.23; 'run': 0.23;
'anything': 0.25; 'project.': 0.27; 'done': 0.28; 'chris': 0.28;
'mostly': 0.28; 'environment': 0.29; 'think': 0.29; 'whole': 0.30;
'header:User-Agent:1': 0.30; 'packages': 0.31; 'am,': 0.31;
'approach': 0.31; 'program': 0.32; "doesn't": 0.32; 'python-list':
0.32; 'received:10.0': 0.32; 'received:mailchannels.net': 0.32;
'received:relay.mailchannels.net': 0.32; 'but': 0.32;
'subject:for': 0.32; "i'm": 0.33; 'script': 0.33; 'server': 0.33;
'header:In-Reply-To:1': 0.34; 'able': 0.34; 'same': 0.34;
'package': 0.34; 'running': 0.35; 'months': 0.35; 'this.': 0.35;
'also,': 0.36; 'really': 0.36; 'cases': 0.36; 'image': 0.36;
'change': 0.36; 'couple': 0.37; "skip:' 10": 0.37; 'using': 0.37;
"it's": 0.37; 'both': 0.38; 'use': 0.39; 'two': 0.39; "that's":
0.39; 'quite': 0.39; 'least': 0.39; 'this,': 0.39; 'prompt': 0.39;
'received:100': 0.39; 'still': 0.40; '(see': 0.40; 'program.':
0.40; 'something': 0.40; 'want': 0.40; 'likely': 0.61; 'come':
0.62; 'me.': 0.64; 'your': 0.64; 'ago.': 0.64; 'mainly': 0.64;
'updating': 0.64; 'upgrade': 0.64; 'years': 0.65; 'outside': 0.67;
'header:Received:6': 0.67; 'received:64': 0.68; 'manager': 0.68;
'further': 0.69; 'launches': 0.69; 'small,': 0.69; 'interest':
0.70; 'desktop': 0.70; 'care': 0.71; 'virtual': 0.71; 'yourself':
0.75; '(e.g.,': 0.76; 'happens': 0.84; '(that': 0.84; 'changed,':
0.84; 'install.': 0.84; 'subject: \n ': 0.84;
'subject:Strategies': 0.84; 'travels': 0.84; 'green': 0.96
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1736872596; a=rsa-sha256;
cv=none;
b=5UsgUZQ4dNWkjqzDYihgYv7TnIwTMJULfUTtIuspaLYF7ErwUu9YqXw4Tv1NORb3oB0TT9
/IY3nt27CoCwdPkCvJ8Ihg0tVLoIU2CYeis1OUFdNiecVWGYo1S9r6hu60zOrbjDRVOasc
Tm3SHLhniyOXXLUwF0FiH5ZfGpz22b/Z+MZFNuuJWXq740C6HLTJmPiPDykFpmZrOrlI5L
ox7JDcuL5IUlroBYk5QWy5opUjwYsACxjQb7NqXv7mvgqdLUpJZ9dxHTJltLElLi5jYs/B
z661NOShPS7LQyfyxxC2DdKVGZg68ACKSP8WMJFkGzfLGJsVofzA/E9tpAoxnw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=mailchannels.net; s=arc-2022; t=1736872596;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=c8K/u9odVhvNB5uvpebc1B3ID7GnFB9HTuzqoAWhMno=;
b=O9JX+dcMT5Y0ktTkP9cWV1fLd6osCsEuvgDIOqK0hQsivqi6hIPPNv3gzByF/ZAC30wTsM
fTYJ6crZ2ogtohbWOqIDlbJEeUxCd0T86XyJRc2HxXaG0ODtbG7ODUfka4/Q0hAbv3b7Ia
q5MiaJk8bNWnjYlDWANOfGBhiO6Gi0OM3ZN77Gcjy/HDmi+u6ULCoxB2vu6cYj9pxN1XYV
2Ig0E4xsWz2gn16QxDryzHrVb4yFulv0dICJV3eyM7umyoO1ilpAnJI/nZAvX1gmKfQtMg
PIZ36FyKPVWWkyu8OcK78SfuZFerroKLXfcCbOM71wvq+wBpPwmR04i7jxdnSg==
ARC-Authentication-Results: i=1; rspamd-7df4dcbd86-r57xx;
auth=pass smtp.auth=dreamhost smtp.mailfrom=list1@tompassin.net
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|tpassin@tompassin.net
X-MailChannels-Auth-Id: dreamhost
X-Madly-Macabre: 2925537173b6b3b4_1736872596229_2204606310
X-MC-Loop-Signature: 1736872596229:4258845053
X-MC-Ingress-Time: 1736872596229
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tompassin.net;
s=dreamhost; t=1736872595;
bh=c8K/u9odVhvNB5uvpebc1B3ID7GnFB9HTuzqoAWhMno=;
h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding;
b=BHZEMiClxZrl1RU1mZeiQgQhNAnyadcWyxr3poKzOpSZXVv5Dx/rb9zbnsYWgB+0H
b8LeNHqJCmgR9f/S6P6KgftBYue5bN28iSOEXaAe1k90GpvLTn/LXDK0JzIOeaJ8Yt
2l/fNSx3o8HoO8+PVC5k0J4P+l0bCwARxs+hA53tp0xuAIgi4X8GV0nee5jpXszCnu
k1l9p+7q9wrXHUPFh8mVYKARpGEj/NBc8/vCwgKOP2e4YMdV0mGLSP5DqOfWNgONyV
5zEAMoc9ZDwtFqMQQJeiov/9Euwyi8EfO+FeDjtyCJ7gLPBtHfCppDchcz8etMAeDC
F4uF9daceDYGw==
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <a81ae072-9857-4c85-a3fb-0d678fbc6cea@tompassin.net>
X-Mailman-Original-References: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
View all headers

On 1/14/2025 6:32 AM, Chris Green via Python-list wrote:
> I have a (relatively) clean Debian 12 installation running on my two
> workhorse systems, a desktop server at home and my laptop that travels
> around with me.
>
> I moved from Xubuntu to Debian on both these systems a few months ago.
>
> I ran Xubuntu for many years and acquired a whole lot of python
> packages installed with pip, as root. For the last couple of years I
> had to use the --break-system-packages option to get things installed.
>
> As far as I'm aware I never hit any dependency problems doing this.
> It's probably because things I installed with pip were mostly quite
> small, specialised, packages that I used in just one or two utility
> programs that I had written myself. In quite a few cases these were
> realated to image processing and such things.
>
>
> So far I've managed to keep my Debian 12 installations 'pip free', I
> haven't even got pip installed. However I may have just come across
> something that would at least be very useful and it comes from PyPi.
> (It's tkintertable if that's of any interest or relevance)
>
>
> What are my options?
>
> Just install it using pip as root and --break-system-packages,
> what's likely to break?

You can also install with --user and --break-system-packages, but that
doesn't really solve the problem. Also, as just happened to me, if an
upgrade happens to change the system's python to a newer version (e.g.,
3.12.x to 3.13.y), you would have to install all your packages again
with the new Python install.

> Use a virtual environment, what do I have to do then to make using
> my program (that uses tkintertable) 'transparent', i.e. I just
> want to be able to run the program from the command prompt like
> any other program.

You can write a shell script that activates the venv and then launches
your program. This works pretty well.

> Download tkintertable from git into my development environment and
> use that. My PYTHONPATH will need to point to it but I can't see
> any further issues with doing this.

This is an approach I use sometimes, mainly if I have cloned a project.
I run the project's program(s) using a script that sets the PYTHONPATH.

> Anything else? As far as I can see using pipx doesn't help me at
> all (see recent thread here).

To completely avoid problems when the system's Python install gets
changed, you can install your own Python version outside of the package
manager; it doesn't have to be the same version as the system's. I've
done this when I wanted to run a later version of Python than the
system's. You would have to take care of updating it yourself since the
package manager won't know about it. On the system where I did this, I
ran the system's python version using "python3" and my own using
"python3.11" (I think the system was still on 3.8 or 3.9).

Subject: Re: Strategies for avoiding having to use --break-system-packages with pip
From: Left Right
Newsgroups: comp.lang.python
Date: Tue, 14 Jan 2025 19:06 UTC
References: 1 2
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: olegsivokon@gmail.com (Left Right)
Newsgroups: comp.lang.python
Subject: Re: Strategies for avoiding having to use --break-system-packages
with pip
Date: Tue, 14 Jan 2025 20:06:39 +0100
Lines: 90
Message-ID: <mailman.78.1736881613.2912.python-list@python.org>
References: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
<CAJQBtgkP9Lob24-9ss_7-737s+eSfKCK9WGCOh1A2ztQFE0roQ@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de AAGn7IRwg9JD2M53qKYgOQhOHtiwlWwZe+RRP5utx5cA==
Cancel-Lock: sha1:tq88HW3cvMZpHMEncJAjf3TsOE4= sha256:n4i6+kyZ8KJzwn3htaaRjAcqdDdrO06C6m17zoGF3p4=
Return-Path: <olegsivokon@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=NI3UsI6+;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'pip': 0.04; 'thread':
0.05; 'automation,': 0.07; 'task.': 0.07; 'thing.': 0.07;
'updates.': 0.07; 'url:mailman': 0.09; 'acquired': 0.09; 'cc:addr
:python-list': 0.09; 'debian': 0.09; 'depend': 0.09;
'dependencies': 0.09; 'else:': 0.09; 'environment,': 0.09;
'forced': 0.09; 'git': 0.09; 'linux': 0.09; 'moved': 0.09;
'myself.': 0.09; 'pip.': 0.09; 'received:mail-
qv1-xf2a.google.com': 0.09; 'subject:packages': 0.09; 'utility':
0.09; 'cc:no real name:2**0': 0.14; 'that.': 0.15; 'url:listinfo':
0.15; '2025': 0.16; 'described.': 0.16; 'directories': 0.16;
'else?': 0.16; 'far,': 0.16; 'infra': 0.16; 'installed.': 0.16;
'personally,': 0.16; 'pip,': 0.16; 'pypi.': 0.16; 'root.': 0.16;
'specify': 0.16; 'subject:pip': 0.16; 'wrote:': 0.16; 'python':
0.16; 'probably': 0.17; "can't": 0.17; 'uses': 0.19; 'installing':
0.19; 'cc:addr:python.org': 0.20; 'option': 0.20; 'url-
ip:188.166.95.178/32': 0.20; 'url-ip:188.166.95/24': 0.20;
'written': 0.22; "i've": 0.22; 'i.e.': 0.22; 'ran': 0.22; 'way.':
0.22; "what's": 0.22; 'install': 0.23; 'command': 0.23;
'installed': 0.23; 'laptop': 0.23; 'run': 0.23; 'url-
ip:188.166/16': 0.24; "i'd": 0.24; 'anything': 0.25; 'cc:2**0':
0.25; 'anyone': 0.25; 'chris': 0.28; 'mostly': 0.28; 'goes': 0.28;
'wrong': 0.28; 'environment': 0.29; 'think': 0.29; 'whole': 0.30;
'packages': 0.31; 'program,': 0.31; 'tue,': 0.31; 'message-
id:@mail.gmail.com': 0.31; 'program': 0.32; "doesn't": 0.32;
'accomplish': 0.32; 'nature': 0.32; 'python-list': 0.32;
"wouldn't": 0.32; 'but': 0.32; 'subject:for': 0.32; "i'm": 0.33;
'distribute': 0.33; 'server': 0.33; 'header:In-Reply-To:1': 0.34;
'received:google.com': 0.34; 'able': 0.34; 'package': 0.34;
'from:addr:gmail.com': 0.34; 'running': 0.35; 'trying': 0.35;
'months': 0.35; 'this.': 0.35; 'cases': 0.36; 'image': 0.36;
'work,': 0.36; 'couple': 0.37; "skip:' 10": 0.37; 'using': 0.37;
"it's": 0.37; 'could': 0.37; 'directory': 0.37; 'copy': 0.63;
'updates': 0.64; 'key': 0.64; 'me.': 0.64; 'ago.': 0.64; 'top':
0.65; 'tool': 0.65; 'years': 0.65; 'time.': 0.66; 'worked': 0.67;
'bad': 0.67; 'entire': 0.67; 'away': 0.68; 'that,': 0.68;
'exactly': 0.68; 'further': 0.69; 'and,': 0.69; 'complexity':
0.69; 'refine': 0.69; 'small,': 0.69; 'interest': 0.70;
'companies': 0.70; 'affected': 0.70; 'desktop': 0.70; 'trust':
0.71; 'care': 0.71; 'virtual': 0.71; 'free': 0.71; 'reliable':
0.74; 'tools': 0.74; 'extra': 0.84; 'happens': 0.84; 'need.':
0.84; '(that': 0.84; 'biased': 0.84; 'danger': 0.84;
'deployments': 0.84; 'job,': 0.84; 'reducing': 0.84; 'revealed':
0.84; 'subject: \n ': 0.84; 'subject:Strategies': 0.84; 'travels':
0.84; 'hopes': 0.91; 'green': 0.96
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1736881610; x=1737486410; darn=python.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=kD6SCtWjURaB7ZgbgUC5JGaNYzjWDygTlWCyUz01DJ8=;
b=NI3UsI6+k499QsM+7VlkpmqN+rP+pObU0fR10YmOpOm9bZn+4Y1Rp9kiZ3/XoztjSX
eikUwzHkigNjziHDw4837rpBGPCaZGnpld6svCGFWLcy0KWqQVvvVCeU5U6BprRBlBVz
U2pBG74sot+iSS5fE9bjcEPVfYosuX7c0PoLeVgfy7p/R+P8feBiln3anVzxgC91Rw+Q
9Q84nqdZKRIQbdkkAwnv1UKvUZILxPeKxRvblu7rSkUwDiD5k+jo/IPQQeaSEhp6s4cQ
H5it2M6gLlE4wUrhQGVj8gxHOdc28YWFEyLSJNAjJORJdGD/6UoFospndgrCv79E1HOT
G4qg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1736881610; x=1737486410;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=kD6SCtWjURaB7ZgbgUC5JGaNYzjWDygTlWCyUz01DJ8=;
b=TKTFOv6YjbND2yjkmrPtMxxrMvSSZfe9X5H7V+fJCndmJXFU7HjZ8KLMdtK6TqoQCK
ujMAzmZDi8jKXoYVar535WKXpB1TPVmJjZnji3g/7J3MYLUE8vf6zZYT2tWldHjFNpR3
7B/z46q/1JCyiVK95wDoVWdof1Wc3mBjHDUJWvv5RpsruPeREHCmUGj0rWDlpOL30KWN
J/3rLi5FY8f4U6OaOQBDswnO3sOSrm34GwM27uvqajxw/Z95ufkpli/TybfZtPFo6Iuz
IxC8oRw6ggop2KBgMkPY9jjObm9Hy141pwt6+NzlyGCL6waOa6zx9UXh2cus8VoaFUwW
p5yQ==
X-Gm-Message-State: AOJu0YwIW7UFANSu0Vv/8fTiuH6ZVJXKd+8ZFb9PiWOv3Lr47SW/Sq9K
H2lzsYhJdEaUg0BrIktYFFSm7Kjlis0zKOsyFyC6g5uvPskMxjjRGF9nZ25hrRnLom2QctrBXn9
FQv6hXqVYVefNBUlKYShmF8Eh2pbOWQ==
X-Gm-Gg: ASbGncsxkj4KaC+6fWT0ZpIHtcInwY1xYKpEusWugd7sYKA/PT+DmWsrqOxcVxfh+ex
CzZhIRRo6/+HS7F7Ids5PKoXp7yhOfasQw94FLzudrZX5oqDNa2Nf9Uv7qfKU0RUoO2+V
X-Google-Smtp-Source: AGHT+IEtPNmsibCrW1/19AHq/jaFBdNWMCTDMHQP0eL+URcIQG++9aORI8+rbWhkHyCg8YO02auiI7YKYF0MPEiChqU=
X-Received: by 2002:a05:6214:2685:b0:6d4:1d7e:bc72 with SMTP id
6a1803df08f44-6e192c73beemr1160086d6.12.1736881610367; Tue, 14 Jan 2025
11:06:50 -0800 (PST)
In-Reply-To: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
X-Gm-Features: AbW1kvZoAYjLAGm6KeTyXkqFMlYSLOS6nFBGXEmM6AuAXamBHX0hcVRYaACaKsc
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAJQBtgkP9Lob24-9ss_7-737s+eSfKCK9WGCOh1A2ztQFE0roQ@mail.gmail.com>
X-Mailman-Original-References: <jjuh5l-g7rv.ln1@q957.zbmc.eu>
View all headers

I wouldn't trust pip to install anything into my system. It's not a
reliable program that I'd recommend anyone to use for things that they
might depend on.

My typical course of action is to create a virtual environment for the
package I need. Install the package into that virtual environment
using pip or w/e the package wants to be installed with. Investigate
and refine the dependencies I need (It's very common in the Python
world to incorrectly specify dependencies, to require a lot of
unnecessary dependencies, to depend on packages in the wrong way). And
after I've figured out what exactly I need to get the package to work,
copy the dependencies together with the package to the platlib
directory of Python I'm using for this task.

If platlib happens to be in the system directories or anywhere else: I
wouldn't care about that. In the process of installing the program, I
would've learned about the nature and the layout of dependencies, so
that I could make informed decisions about what goes where and whether
anything is needed or is in danger of being affected by system updates
or endangers system updates.

So far, this has worked every time. This worked for me personally,
for small companies that do internal deployments and for big companies
that distribute Python together with the entire Linux distribution in
this way. The key ingredient is to know what you are doing and to be
able to anticipate the bad things. Tools like pip take away from the
users the need to know what they are doing in hopes of reducing
complexity on the part of the users' knowledge necessary to accomplish
program installation. However, there's no free lunch, and tools like
pip bring an extra layer of complexity in trying to do what they
claim. This layer of complexity is usually revealed when these tools
fail to do what they claim, and users are forced to learn what they
actually need to know and, on top of that, how to troubleshoot
programs like pip.

>From working in infra / automation, I get the knowledge about program
/ package installation "free" on the job, so, I don't see a point in
using a tool that automates that for me beyond what I already
described. I'm probably also biased because of that, but I still think
that learning to do the thing is more important than learning how to
use the tool that does the thing.

On Tue, Jan 14, 2025 at 4:42 PM Chris Green via Python-list
<python-list@python.org> wrote:
>
> I have a (relatively) clean Debian 12 installation running on my two
> workhorse systems, a desktop server at home and my laptop that travels
> around with me.
>
> I moved from Xubuntu to Debian on both these systems a few months ago.
>
> I ran Xubuntu for many years and acquired a whole lot of python
> packages installed with pip, as root. For the last couple of years I
> had to use the --break-system-packages option to get things installed.
>
> As far as I'm aware I never hit any dependency problems doing this.
> It's probably because things I installed with pip were mostly quite
> small, specialised, packages that I used in just one or two utility
> programs that I had written myself. In quite a few cases these were
> realated to image processing and such things.
>
>
> So far I've managed to keep my Debian 12 installations 'pip free', I
> haven't even got pip installed. However I may have just come across
> something that would at least be very useful and it comes from PyPi.
> (It's tkintertable if that's of any interest or relevance)
>
>
> What are my options?
>
> Just install it using pip as root and --break-system-packages,
> what's likely to break?
>
> Use a virtual environment, what do I have to do then to make using
> my program (that uses tkintertable) 'transparent', i.e. I just
> want to be able to run the program from the command prompt like
> any other program.
>
> Download tkintertable from git into my development environment and
> use that. My PYTHONPATH will need to point to it but I can't see
> any further issues with doing this.
>
> Anything else? As far as I can see using pipx doesn't help me at
> all (see recent thread here).
>
> --
> Chris Green
> ·
> --
> https://mail.python.org/mailman/listinfo/python-list

1

rocksolid light 0.9.8
clearnet tor