X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C83FF3858009 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=systematicsw.ab.ca X-Authority-Analysis: v=2.4 cv=Y6brDzSN c=1 sm=1 tr=0 ts=6236daf3 a=oHm12aVswOWz6TMtn9zYKg==:117 a=oHm12aVswOWz6TMtn9zYKg==:17 a=IkcTkHD0fZMA:10 a=Q5AeWgmnku2lR0hwdRQA:9 a=QEXdDO2ut3YA:10 Message-ID: Date: Sun, 20 Mar 2022 01:42:42 -0600 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: python ensurepip fails due to being unable to find files Content-Language: en-CA To: cygwin AT cygwin DOT com References: From: Brian Inglis Organization: Systematic Software In-Reply-To: X-CMAE-Envelope: MS4xfOn2VucW4sCZSQU09rKYxQTkNVDrl18xAmXo/n5jEl8SMeJKEQjlK2AwNiO50EjgZQGqwND08xRoSsZNPxjviRrMH4t4CUHR5MnmyODCtlGZ4Ar3k90N ZFERAXJ4o/xPAJu+0Jhn5M0A0ksl4JxNcrNDrAptYxLwtyWv6An2PBS/yHojPMTHT2eyXXPAGxvnyhLFIGeTne4lWicjCEE941Y= X-Spam-Status: No, score=-1164.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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 AT cygwin DOT 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: , Reply-To: cygwin AT cygwin DOT com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On 2022-03-19 22:07, The Other wrote: > Using the most recent version of python3 (3.9.10), I was unable to set up a > virtual environment with "python -m venv venv". This was due to the > ensurepip stage failing. As such, I tried running ensurepip directly. > > Output when running "python -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 > > Looking at the actual code in __init__.py, the function that is failing > seems to be constructing a list of .whl files in "_WHEEL_DIR", > "/usr/share/python-wheels/", and then returning the latest version of the > desired one (setuptools and pip are requested). However, it can't find any > .whl files, and so the max() function fails. > > My cygwin installation doesn't even seem to have a python-wheels folder in > /usr/share, let alone any .whl files in it. I'm not sure if cygwin > downloads and stores .whl files elsewhere, or if they even get downloaded > at all. > > The same error occurs for other versions of python3 I have installed, > including python3.8 and python3.6. > > I have attached my cygcheck.out file as cygcheck.out.txt. My python 3.9 > install is all OK, though some of the older ones are incomplete for pip. Ensure all Cygwin processes are shut down from cmd or Powershell: > tasklist /m cygwin1.dll INFO: No tasks are running which match the specified criteria. or usually: Image Name PID Modules ========================= ======== =========== bash.exe 9276 cygwin1.dll sh.exe 3844 cygwin1.dll xinit.exe 10652 cygwin1.dll XWin.exe 3596 cygwin1.dll dbus-launch.exe 8104 cygwin1.dll dbus-daemon.exe 1512 cygwin1.dll gnome-keyring-daemon.exe 6488 cygwin1.dll fbxkb.exe 2196 cygwin1.dll xwin-xdg-menu.exe 3372 cygwin1.dll gam_server.exe 3580 cygwin1.dll pcmanfm.exe 7496 cygwin1.dll mintty.exe 18284 cygwin1.dll bash.exe 4340 cygwin1.dll ssh-agent.exe 14608 cygwin1.dll bash.exe 8384 cygwin1.dll but be aware it shows processes, excluding services, using any cygwin1.dll if you have multiple environments installed; or check TaskMgr Details Image path name does not show anything running from your Cygwin root bin or related directories. Download and run latest Cygwin Setup program. Reinstall incomplete or missing python3{,6,7,8,9}-pip latest versions and also install python3{,6,7,8,9}-virtualenv which all preinstall dependencies python-{pip,setuptools,wheel}-wheel. Allow the setup postinstall scripts to complete and check for any issues in /var/log/setup.log.full. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in binary units and prefixes, physical quantities in SI.] -- 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