From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Cc: The Other <simplytheother@gmail.com>
Subject: Re: python ensurepip fails due to being unable to find files
Date: Sun, 20 Mar 2022 10:07:01 -0600 [thread overview]
Message-ID: <c8c7cd5a-68e4-5ff0-1388-1cd31ad25fcd@SystematicSw.ab.ca> (raw)
In-Reply-To: <be155548-3778-54aa-57dc-b9533b0ee974@SystematicSw.ab.ca>
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.]
next prev parent reply other threads:[~2022-03-20 16:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-20 4:07 The Other
2022-03-20 7:42 ` Brian Inglis
2022-03-20 16:07 ` Brian Inglis [this message]
2022-03-20 17:46 ` Wayne Davison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8c7cd5a-68e4-5ff0-1388-1cd31ad25fcd@SystematicSw.ab.ca \
--to=brian.inglis@systematicsw.ab.ca \
--cc=cygwin@cygwin.com \
--cc=simplytheother@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).