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

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

Path: ...!npeer.as286.net!npeer-ng0.as286.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: Thomas Passin <list1@tompassin.net>
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>
Bytes: 9693

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).