Sphinx install on Python 3.9.7 in virtual env error:

New install of Python 3.9.7 on RHEL 7. Using a Virtual Environment for my login which is “oracle”.

All pre-requisite pip packages installed fine. But the Sphinx 4.2.0 package failed with
ERROR: Could not find a version that satisfies the requirement packaging (from sphinx) (from versions: none)
ERROR: No matching distribution found for packaging

The command I ran was:
pip install -vvv --no-index --find-link=/usr/opt/oracle/downloads/python-addons sphinx

Output from command
Using pip 21.2.4 from /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages/pip (python 3.9)
Non-user install because user site-packages disabled
Ignoring indexes: Simple index
Created temporary directory: /tmp/pip-ephem-wheel-cache-thckvaqi
Created temporary directory: /tmp/pip-req-tracker-19_p45ms
Initialized build tracking at /tmp/pip-req-tracker-19_p45ms
Created build tracker: /tmp/pip-req-tracker-19_p45ms
Entered build tracker: /tmp/pip-req-tracker-19_p45ms
Created temporary directory: /tmp/pip-install-laqbgwdj
Looking in links: /usr/opt/oracle/downloads/python-addons
0 location(s) to search for versions of sphinx:
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/wheel-0.37.0.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/urllib3-1.26.6.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/sphinxcontrib-serializinghtml-1.1.5.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/sphinxcontrib-qthelp-1.0.3.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/sphinxcontrib-jsmath-1.0.1.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/sphinxcontrib-htmlhelp-2.0.0.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/sphinxcontrib-devhelp-1.0.2.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/sphinxcontrib-applehelp-1.0.2.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/snowballstemmer-2.1.0.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/setuptools-58.0.4.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/requests-2.26.0.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/pytz-2021.1.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/pip-21.2.4.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/imagesize-1.2.0.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/idna-3.2.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/docutils-0.17.1.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/charset-normalizer-2.0.6.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/certifi-2021.5.30.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/alabaster-0.7.12.tar.gz
Found link file:///usr/opt/oracle/downloads/python-addons/Sphinx-4.2.0.tar.gz, version: 4.2.0
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/Pygments-2.10.0.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/MarkupSafe-2.0.1.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/Jinja2-3.0.1.tar.gz
Skipping link: Missing project version for sphinx: file:///usr/opt/oracle/downloads/python-addons/Babel-2.9.1.tar.gz
Local files found: /usr/opt/oracle/downloads/python-addons/Sphinx-4.2.0.tar.gz
Given no hashes to check 1 links for project ‘sphinx’: discarding no candidates
Processing ./Sphinx-4.2.0.tar.gz
Added sphinx from file:///usr/opt/oracle/downloads/python-addons/Sphinx-4.2.0.tar.gz to build tracker ‘/tmp/pip-req-tracker-19_p45ms’
Running setup.py (path:/tmp/pip-install-laqbgwdj/sphinx_a00fd8dca94141938ce77d662e52bdcf/setup.py) egg_info for package sphinx
Created temporary directory: /tmp/pip-pip-egg-info-56zz_gqw
Running command python setup.py egg_info
running egg_info
creating /tmp/pip-pip-egg-info-56zz_gqw/Sphinx.egg-info
writing /tmp/pip-pip-egg-info-56zz_gqw/Sphinx.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-56zz_gqw/Sphinx.egg-info/dependency_links.txt
writing entry points to /tmp/pip-pip-egg-info-56zz_gqw/Sphinx.egg-info/entry_points.txt
writing requirements to /tmp/pip-pip-egg-info-56zz_gqw/Sphinx.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-56zz_gqw/Sphinx.egg-info/top_level.txt
writing manifest file ‘/tmp/pip-pip-egg-info-56zz_gqw/Sphinx.egg-info/SOURCES.txt’
reading manifest file ‘/tmp/pip-pip-egg-info-56zz_gqw/Sphinx.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no files found matching ‘sphinx-autogen.py’
warning: no files found matching ‘sphinx-build.py’
warning: no files found matching ‘sphinx-quickstart.py’
warning: no files found matching ‘sphinx-apidoc.py’
warning: no files found matching ‘sphinx/locale/.tx/config’
no previously-included directories found matching ‘doc/_build’
no previously-included directories found matching ‘sphinx/locale/.tx’
adding license file ‘LICENSE’
writing manifest file ‘/tmp/pip-pip-egg-info-56zz_gqw/Sphinx.egg-info/SOURCES.txt’
Source in /tmp/pip-install-laqbgwdj/sphinx_a00fd8dca94141938ce77d662e52bdcf has version 4.2.0, which satisfies requirement sphinx from file:///usr/opt/oracle/downloads/python-addons/Sphinx-4.2.0.tar.gz
Removed sphinx from file:///usr/opt/oracle/downloads/python-addons/Sphinx-4.2.0.tar.gz from build tracker ‘/tmp/pip-req-tracker-19_p45ms’
Requirement already satisfied: sphinxcontrib-applehelp in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (1.0.2)
Requirement already satisfied: sphinxcontrib-devhelp in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (1.0.2)
Requirement already satisfied: sphinxcontrib-jsmath in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (1.0.1)
Requirement already satisfied: sphinxcontrib-htmlhelp>=2.0.0 in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (2.0.0)
Requirement already satisfied: sphinxcontrib-serializinghtml>=1.1.5 in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (1.1.5)
Requirement already satisfied: sphinxcontrib-qthelp in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (1.0.3)
Requirement already satisfied: Jinja2>=2.3 in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (3.0.1)
Requirement already satisfied: Pygments>=2.0 in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (2.10.0)
Requirement already satisfied: docutils<0.18,>=0.14 in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (0.17.1)
Requirement already satisfied: snowballstemmer>=1.1 in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (2.1.0)
Requirement already satisfied: babel>=1.3 in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (2.9.1)
Requirement already satisfied: alabaster<0.8,>=0.7 in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (0.7.12)
Requirement already satisfied: imagesize in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (1.2.0)
Requirement already satisfied: requests>=2.5.0 in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (2.26.0)
Requirement already satisfied: setuptools in /usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages (from sphinx) (58.0.4)
0 location(s) to search for versions of packaging:
Skipping link: Missing project version for packaging: file:///usr/opt/oracle/downloads/python-addons/Sphinx-4.2.0.tar.gz
Given no hashes to check 0 links for project ‘packaging’: discarding no candidates
ERROR: Could not find a version that satisfies the requirement packaging (from sphinx) (from versions: none)
ERROR: No matching distribution found for packaging
Exception information:
Traceback (most recent call last):
File “/usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py”, line 94, in resolve
result = self._result = resolver.resolve(
File “/usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 472, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File “/usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 376, in resolve
raise ResolutionImpossible(causes)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement(‘packaging’), parent=LinkCandidate(‘file:///usr/opt/oracle/downloads/python-addons/Sphinx-4.2.0.tar.gz’))]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages/pip/_internal/cli/base_command.py”, line 173, in _main
status = self.run(options, args)
File “/usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages/pip/_internal/cli/req_command.py”, line 203, in wrapper
return func(self, options, args)
File “/usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages/pip/_internal/commands/install.py”, line 315, in run
requirement_set = resolver.resolve(
File “/usr/opt/oracle/py3-sphinx/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py”, line 103, in resolve
raise error from e
pip._internal.exceptions.DistributionNotFound: No matching distribution found for packaging
Removed build tracker: ‘/tmp/pip-req-tracker-19_p45ms’

The issue is now resolved. I thought it was looking for a package but I completely missed the fact that the package name was packaging. I can’t connect to the internet from my machines. So, I have to download everything manually from PyPI.

I added packages pyparsing and packaging …
And

Building wheels for collected packages: sphinx
Building wheel for sphinx (setup.py) … done
Created wheel for sphinx: filename=Sphinx-4.2.0-py3-none-any.whl size=3061858 sha256=c5b28f87749557dc8c06b9820c748d6c5e764e32f2f25620d08b3259993ea90a
Stored in directory: /usr/opt/oracle/.cache/pip/wheels/31/d2/bc/aa1cbddf1cd38373f4632ab20b0e3400f037bcf271b50b2397
Successfully built sphinx
Installing collected packages: sphinx
Successfully installed sphinx-4.2.0

This may be helpful to others.
Thank you