From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id 052753858C35 for ; Mon, 27 Nov 2023 17:15:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 052753858C35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 052753858C35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::636 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 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a0f49b31868so165269466b.3 for ; Mon, 27 Nov 2023 09:15:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701105336; x=1701710136; darn=cygwin.com; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=17BO0Q2ao+vwjrpu11kx2cYW+wZx2cVRUFCXMgORqog=; b=laWJmA6U8qcvoduZKcA22eddwdT6xOvtfi3UBAo64XTN6dPJFOHbo5T5g7J74gt5Th KW009ar/S9PdJVcYe7EfnGeWBUUBSYNd76yGUhhBxVOJc/moC0c0TN/3qsb5YdnzS6e2 gNzYflCL2yp86I+1FVPmhQP46twj8AvyWKSXbYnsnnsgI4btyKT7jwoieeDnj/siFUbp v7pn3+jxpTHGXCNbuuyq6oQEcGNHFwjjxCAZ/P9AqGy5HQjWe+tdZzGU/n7igS+UQqYP V7tX0t6YgXmFgeTITFoQXMh/4yAlhfCGt7HqWvJQAmn7PGTGKlLi9H/bUjie1LJn5bUc lutg== 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) Received: from ?IPV6:2001:a61:126f:2c01:9590:b775:34c:d078? ([2001:a61:126f:2c01:9590:b775:34c:d078]) by smtp.gmail.com with ESMTPSA id ck16-20020a170906c45000b00a0029289961sm5885335ejb.190.2023.11.27.09.15.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Nov 2023 09:15:35 -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 Content-Language: it To: Adam Dinwoodie , Jon Turney , The Cygwin Mailing List References: <20231108161743.fhr7sum3k445ag67@lucy.dinwoodie.org> <45e21c6e-98a4-443b-bfbd-d3475c3452c0@dronecode.org.uk> <20231110154353.d2hqp6vxu7fokcrv@lucy.dinwoodie.org> From: Marco Atzeri In-Reply-To: <20231110154353.d2hqp6vxu7fokcrv@lucy.dinwoodie.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 List-Id: 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