From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-h1p-028590.sys.comcast.net (resqmta-h1p-028590.sys.comcast.net [IPv6:2001:558:fd02:2446::8]) by sourceware.org (Postfix) with ESMTPS id E8F533858D37 for ; Sun, 3 Apr 2022 16:57:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E8F533858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=acm.org Received: from resomta-h1p-028515.sys.comcast.net ([96.102.179.209]) by resqmta-h1p-028590.sys.comcast.net with ESMTP id b3U2nq6b8SAIfb3Xbnetb4; Sun, 03 Apr 2022 16:57:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20211018a; t=1649005047; bh=wsFezfbabGxYl8E46krZ+IouEN7pKctLaMrphPBESbg=; h=Received:Received:Message-ID:Date:MIME-Version:Subject:From:To: Content-Type; b=xp3b43DN7sxCIoau22lfZanCetKF9v5HCyjB9ZLadi4vueo6JXvZtzermmSsD+DX1 disLgoIXnoXknAfh5SnzLFG0sT8z0oUjAc4lAuDKVsYOgmApggM/kTG7l3iu6DKlbw Yhv4UWp/SrGzEaI5tT4G1KnjXPR1phTsCtmR6M5uH0VgX3eqbElRIygQHaTbjeXXTJ IJ453VlC/Xug4Rz5v42YMCK1ECuxIDCIHF/pIKHRCPJ6yGOLla3qP82cYIpx6kHuK3 zSN2XfcaIe6idA2Am+9qwaoxc6+C0pr/gcWryZEIsTgzZr1Sn1K8croIM9/ZTVa19o Lu9LTUs5bkcZQ== Received: from [IPV6:2601:547:c500:a4:cce:2964:9b5a:9b1c] ([IPv6:2601:547:c500:a4:cce:2964:9b5a:9b1c]) by resomta-h1p-028515.sys.comcast.net with ESMTPSA id b3XCnFyjjfdSVb3XDnHzKK; Sun, 03 Apr 2022 16:57:06 +0000 X-Xfinity-VMeta: sc=0.00;st=legit Message-ID: <65a44cd2-c28d-278e-979a-321937dd529d@acm.org> Date: Sun, 3 Apr 2022 12:57:02 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: Problems with python3 pip Content-Language: en-US From: Chad Dougherty To: cygwin@cygwin.com References: <160224bb-9e4f-9b7a-b930-ec6440822413@acm.org> In-Reply-To: <160224bb-9e4f-9b7a-b930-ec6440822413@acm.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, NICE_REPLY_A, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Apr 2022 16:57:34 -0000 On 2022-03-28 09:36, Chad Dougherty wrote: > It seems to me like the ensurepip module has some problems.  Shouldn't > the following be working? > > $ cygcheck -c -d|grep python3 > python3                  3.9.10-1 > python3-devel            3.9.10-1 > python39                 3.9.10-1 > python39-devel           3.9.10-1 > python39-pip             21.3.1-3 > python39-setuptools      59.5.0-1 > $ type python3.9 > python3.9 is hashed (/usr/bin/python3.9) > $ type pip3.9 > pip3.9 is hashed (/usr/bin/pip3.9) > $ pip3.9 --version > pip 21.3.1 from /usr/lib/python3.9/site-packages/pip (python 3.9) > $ pip3.9 list > Package    Version > ---------- ------- > pip        21.3.1 > setuptools 59.5.0 > WARNING: You are using pip version 21.3.1; however, version 22.0.4 is > available. > You should consider upgrading via the '/usr/bin/python3.9.exe -m pip > install --upgrade pip' command. > > $ python3.9 -m ensurepip > Traceback (most recent call last): >   File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main >     mod_name, mod_spec, code = _get_module_details(mod_name, _Error) >   File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details >     return _get_module_details(pkg_main_name, error) >   File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details >     __import__(pkg_name) >   File "/usr/lib/python3.9/ensurepip/__init__.py", line 30, in >     _SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") >   File "/usr/lib/python3.9/ensurepip/__init__.py", line 27, in > _get_most_recent_wheel_version >     return str(max(_wheels[pkg], key=distutils.version.LooseVersion)) > ValueError: max() arg is an empty sequence > $ python3.9 -m ensurepip --user > Traceback (most recent call last): >   File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main >     mod_name, mod_spec, code = _get_module_details(mod_name, _Error) >   File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details >     return _get_module_details(pkg_main_name, error) >   File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details >     __import__(pkg_name) >   File "/usr/lib/python3.9/ensurepip/__init__.py", line 30, in >     _SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") >   File "/usr/lib/python3.9/ensurepip/__init__.py", line 27, in > _get_most_recent_wheel_version >     return str(max(_wheels[pkg], key=distutils.version.LooseVersion)) > ValueError: max() arg is an empty sequence > $ > > > This causes the failure of "-m venv", which is what I ultimately want to > do: > $ python3.9 -m venv /home/crd/testvenv > Error: Command '['/home/crd/testvenv/bin/python3.9.exe', '-Im', > 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit > status 1. > > I also tried python38 and had similar problems. > > Thanks... > The problem appears to be that the python-pip-wheel and python-setuptools-wheel packages were not installed on my system. Apparently they were a requirement for the python35 packages but that requirement was removed in python36 and later. At some point in the past when I removed python35, I was also able to remove python-pip-wheel and python-setuptools-wheel which got me into this problem. After reinstalling python-pip-wheel and python-setuptools-wheel, ensurepip and venv are both working from python39. It seems to me like python-pip-wheel and python-setuptools-wheel should probably be re-added as dependencies for newer python3 packages. Thanks... -- -Chad