Mail Archives: cygwin/2022/03/20/12:07:21
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 096563858D37
|
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=62375126
|
| a=oHm12aVswOWz6TMtn9zYKg==:117 a=oHm12aVswOWz6TMtn9zYKg==:17
|
| a=IkcTkHD0fZMA:10 a=fF7tF59ZXKH2lPkxN4UA:9 a=QEXdDO2ut3YA:10
|
Message-ID: | <c8c7cd5a-68e4-5ff0-1388-1cd31ad25fcd@SystematicSw.ab.ca>
|
Date: | Sun, 20 Mar 2022 10:07:01 -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
|
From: | Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
|
To: | cygwin AT cygwin DOT com
|
References: | <CADYxmzT9q3LhfONvhu9Z_ZQoE3_dAM5jOv70OHp6ntdWF855AA AT mail DOT gmail DOT com>
|
| <be155548-3778-54aa-57dc-b9533b0ee974 AT SystematicSw DOT ab DOT ca>
|
Organization: | Systematic Software
|
In-Reply-To: | <be155548-3778-54aa-57dc-b9533b0ee974@SystematicSw.ab.ca>
|
X-CMAE-Envelope: | MS4xfFu6xRydNOg8vAFaa5VUBVjTltDNTcEmGvnUt4b+gokNUhaeauphk3az7l+eGntmu4ESflI/0JN6K20SFrZyPHo+UMcZevlBw+3lWmV65QH/oubInbEs
|
| DMcIIGm3+x+eiThFXODr5/wEfEZ0jBKew6OBvgJKAXiRgbQOuEtFmv5OBmtbg0sEBinlI3fFwEcIEM4v6ADQCUtosabbB/FdYhU1GtRJVxb46zvy+c+hQan1
|
X-Spam-Status: | No, score=-1162.6 required=5.0 tests=BAYES_00, BODY_8BITS,
|
| 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
|
List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com>
|
List-Unsubscribe: | <https://cygwin.com/mailman/options/cygwin>,
|
| <mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
|
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>
|
Reply-To: | cygwin AT cygwin DOT com
|
Cc: | The Other <simplytheother AT gmail DOT com>
|
Errors-To: | cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
|
Sender: | "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
|
X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id 22KG7K2Q011130
|
On 2022-03-20 01:42, Brian Inglis wrote:
> 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 <module>
>> Â Â Â Â _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.
Also forgot to suggest python3{,6,7,8,9}-tox which preinstalls
...-virtualenv and handles managing and using virtual environments.
--
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
- Raw text -