delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/11/27/12:16:23

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 945413857BBD
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1701105381;
bh=DuKVQ6Y0bkWqnFoBdld2PRoHNN6tRjAkYeVs4vTDunU=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=lJelro8spax75HIzB2xVlDKEXVF3VvgskBhTfTDEJGejNwUoqdrN4vjKa7FsvqY8Q
i9BneipU0ev6tmwrw7XvL9n7fwpDhiI9U04hT/cgc9r02Cn5Ro9PoO3BuULkllc3nW
eGmTE68Mnn9EHyUTncGgITyEgL3o/nBX+qAjD1E4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 052753858C35
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 052753858C35
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701105341; cv=none;
b=gQqXS+PbHcmv0JAtlMHasvMGANqTnUtZMu40hiiUuMcfR0KKTQ4uifWQffZczcYXZNFuei6INi4AHq7cqgSe5OSE4PBQE9Rbrv6A2LYaOKVPAesbAm6ls3UCFUBTJjrBwAFKTsUqtBD15TWTGd5WaHK0fVtqWwbkIuWBhKmq+qg=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1701105341; c=relaxed/simple;
bh=Byj3UE4FeE6c87btp8t/8F88C5gDhJFixr1k9VwpEsY=;
h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;
b=uZvRb9Kvi1//50o7n3hOoh9kkY3PFmOBo+13mHetlkRMzFF4bzeSJR7zpBue4o1mICTXABqLAfmaZkSrHxFRuVxAdY/eGQQW2mJFHVAwJxX2WgHuFqimLB9CuaWQyt/JGaeMJP8PSWn574xG8J0V703M4m5AZB83PtOqeNOWIw8=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1701105336; x=1701710136;
h=content-transfer-encoding:in-reply-to:from:references:to
:content-language:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=17BO0Q2ao+vwjrpu11kx2cYW+wZx2cVRUFCXMgORqog=;
b=vHY9o9rTznw5ua52+usOTldsdup8tamq3hajdk6bepEXnDlt1sFm0ul4HZp7spdTRe
bUfv9LirSDT1FNyTAjs1JYowUv4cqSO0jpeuHlkxwBJcSBd8ykQvdh3wKXO3/VEBe4b2
2+pdASoaRpgwZ3iL0+lDJ0lmsU3H9I0raB+VGPN8mhhhHNzTWRNRBHiUO3pBCwL8zkdq
8QrNevFFOEsXjc4wiQwCq+jZxzsShURobYSem05k3EHI6vJJfvmqfTdC+59sXpN7T06F
OhkRc2WNFSKtVc8OnfK3rva/HOx63oLZ+AyR2l394McSbU45Z8fg4OmeEKHjo9Y90gna
eXcg==
X-Gm-Message-State: AOJu0YyQq27GEU2TeHnfk/rNtfxa0/rGed2fxc48y31KtimjzdhskSN6
+BGlcGdQDfk5DSADFuVbfbs=
X-Google-Smtp-Source: AGHT+IEoALQPgTeEPtiPnoHYqEvb4GKzek/Di7QFUqpMg+2t46aaSG6PAE6MT9Ukp0QRKK/Ktfq38Q==
X-Received: by 2002:a17:907:168c:b0:a12:5e2e:d27a with SMTP id
cx12-20020a170907168c00b00a125e2ed27amr132141ejd.0.1701105336216;
Mon, 27 Nov 2023 09:15:36 -0800 (PST)
Message-ID: <71ab548c-dfc3-4d2f-9863-f60d4e69f1ab@gmail.com>
Date: Mon, 27 Nov 2023 18:15:35 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Missing Python dependencies for venv standard library module
To: Adam Dinwoodie <adam AT dinwoodie DOT org>,
Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>,
The Cygwin Mailing List <cygwin AT cygwin DOT com>
References: <20231108161743 DOT fhr7sum3k445ag67 AT lucy DOT dinwoodie DOT org>
<45e21c6e-98a4-443b-bfbd-d3475c3452c0 AT dronecode DOT org DOT uk>
<20231110154353 DOT d2hqp6vxu7fokcrv AT lucy DOT dinwoodie DOT org>
In-Reply-To: <20231110154353.d2hqp6vxu7fokcrv@lucy.dinwoodie.org>
X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Marco Atzeri via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On 10.11.2023 16:43, Adam Dinwoodie via Cygwin wrote:
> On Fri, Nov 10, 2023 at 02:35:16PM +0000, Jon Turney wrote:
>> On 08/11/2023 16:17, Adam Dinwoodie via Cygwin wrote:
>>> Hullo,
>>>
>>> It looks like the python39 package is missing dependencies on
>>> python-setuptools-wheel and python-pip-wheel.  I've not checked, but I
>>> suspect earlier Python versions are missing the same dependencies.
>>> Without these, the Python built-in venv module doesn't work:
>>>
>>>       $ python3 -m venv v
>>>       Error: Command '['/home/WDAGUtilityAccount/v/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
>>>
>>> Compare when the both python-setuptools-wheel and python-pip-wheel are
>>> installed:
>>>
>>>       $ python3 -m venv v
>>>       $ . v/bin/activate
>>>       (v) $ python3 -c 'import sys; print(sys.path)'
>>>       ['', '/usr/lib/python39.zip', '/usr/lib/python3.9', '/usr/lib/python3.9/lib-dynload', '/home/WDAGUtilityAccount/v/lib/python3.9/site-packages']
>>>       (v) $ deactivate
>>>
>>> I've attached cygcheck files from sandbox VMs for both the broken and
>>> working cases.  I'm not sure what the correct fix is here -- possibly
>>> adding dependencies, possibly changing how things are packaged -- but
>>> I'd expect Python standard library modules to either work or to give an
>>> error message that makes it clearer what additional packages are
>>> required to make them work.
>>
>> Yeah. I have a vague recollection there was some other case recently where
>> one these being missing was causing some confusion.
>>
>> I think the easiest way to convince me that this is a historical oversight
>> would be to look how other distros do this: If they have python depend on
>> python-setuptools and python-wheel, then we probably should as well...
> 
> I only have Debian set up to check quickly, but just looking at that
> example:
> 
> - /usr/share/python-wheels/setuptools-66.1.1-py3-none-any.whl is
>    provided by the python3-setuptools-whl package.
> - python3-setuptools-whl is required by python3.11-venv
> - python3.11-venv is required by python3-venv
> - python3-venv is suggested (*not* required) by python3
> 
> Slighly confusingly, python3.11-venv looks to only provide the ensurepip
> module; the venv module is provided by libpython3.11-stdlib, which is a
> requirement for python3, so it's only an Apt "suggestion" that gets this
> working there.  However, Debian does provide a more useful error message
> when you don't have things installed usefully:
> 
>      $ python3 -m venv v
>      The virtual environment was not created successfully because ensurepip is not
>      available.  On Debian/Ubuntu systems, you need to install the python3-venv
>      package using the following command.
>      
>          apt install python3.11-venv
>      
>      You may need to use sudo with that command.  After installing the python3-venv
>      package, recreate your virtual environment.
>      
>      Failing command: /home/adam/v/bin/python3
> 
> So that's at least one other distro that is at least a bit more helpful.
> As I say, I don't have strong opinions on what the correct fix is here.
> Just adding the dependencies is an obvious option, and probably the
> easiest option from a maintainer perspective, but it's clearly not the
> only option.

Hi Adam,

I had the impression that setuptools was obsolete.
But I need to refresh my knowledge and the python packages in generale

Regards
Marco



-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019