1
votes

We want to install the Jinja2-2.10-py2.py3-none-any.whl package by pip - on new REDHAT OS ( version 7.2 )

pip install Jinja2-2.10-py2.py3-none-any.whl
Processing ./Jinja2-2.10-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2==2.10)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))': /simple/markupsafe/

I am not understand why pip failed with “'Temporary failure in name resolution” while we want to install the - Jinja2-2.10-py2.py3-none-any.whl package by pip ?

We try also the following without successfully:

pip install --no-index --find-links  Jinja2-2.10-py2.py3-none-any.whl
Ignoring indexes: https://pypi.python.org/simple
You must give at least one requirement to install (maybe you meant "pip install Jinja2-2.10-py2.py3-none-any.whl"?)

pip install --no-index /tmp/install/Jinja2-2.10-py2.py3-none-any.whl
Ignoring indexes: https://pypi.python.org/simple
Processing ./Jinja2-2.10-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2==2.10)
  Could not find a version that satisfies the requirement MarkupSafe>=0.23 (from Jinja2==2.10) (from versions: )
No matching distribution found for MarkupSafe>=0.23 (from Jinja2==2.10)

 pip install -U Jinja2-2.10-py2.py3-none-any.whl
Processing ./Jinja2-2.10-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2==2.10)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))': /simple/markupsafe/

 pip install -e  Jinja2-2.10-py2.py3-none-any.whl
Jinja2-2.10-py2.py3-none-any.whl should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+

in this case PIP - is local folder

pip install -e PIP/Jinja2-2.10-py2.py3-none-any.whl
PIP/Jinja2-2.10-py2.py3-none-any.whl should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+

UPDATE

[root@Master install_zone]# ls PIP/
Jinja2-2.10-py2.py3-none-any.whl

[root@Master install_zone]#  pip install --no-index --find-links=./PIP Jinja2
Ignoring indexes: https://pypi.python.org/simple
Collecting Jinja2
Collecting MarkupSafe>=0.23 (from Jinja2)
  Could not find a version that satisfies the requirement MarkupSafe>=0.23 (from Jinja2) (from versions: )
No matching distribution found for MarkupSafe>=0.23 (from Jinja2)
[root@Master install_zone]#

WE CHECK THE resolving as: ( details are from /etc/resolv.conf )

[root@Master install_zone]# host  sys54.com
sys54.com has address 32.44.1.154
[root@Master install_zone]# host 32.44.1.154
17.2.21.10.in-addr.arpa domain name pointer mpsload.sys54.com.
1

1 Answers

0
votes

Your command is slightly wrong, the find-links argument should point to the directory the package is in, not the package itself:

-f, --find-links If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.

Above pip install --no-index --find-links Jinja2-2.10-py2.py3-none-any.whl is directing pip to look in a Jinja2-2.10-py2.py3-none-any.whl directory for a package, but you've not told pip what to install.

Assuming you downloaded the file into a subdirectory called PIP, your command should be: pip install --no-index --find-links=./PIP Jinja2