Deutsch   English   Français   Italiano  
<mailman.78.1736881613.2912.python-list@python.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: Left Right <olegsivokon@gmail.com>
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>
Bytes: 11225

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=E2=80=AFPM 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.
>
========== REMAINDER OF ARTICLE TRUNCATED ==========