I can install a local package as below:
....,root,root # /usr/bin/pip3 install PyYAML-5.3.tar.gz
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Processing ./PyYAML-5.3.tar.gz
Installing collected packages: PyYAML
Found existing installation: PyYAML 3.13
Uninstalling PyYAML-3.13:
Successfully uninstalled PyYAML-3.13
Running setup.py install for PyYAML ... done
Successfully installed PyYAML-5.3
....,root,root #
but if I try below command it fails as it will search on the internet (my VM has no internet connection)
,root,root # /usr/bin/pip3 install PyYAML==5.3
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting PyYAML==5.3
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f17164e0080>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pyyaml/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f17164e0198>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pyyaml/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f17164e0278>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pyyaml/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f17164e0358>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pyyaml/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f17164e0400>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pyyaml/
Could not find a version that satisfies the requirement PyYAML==5.3 (from versions: )
No matching distribution found for PyYAML==5.3
.....,root,root #
so the question is where to put my downloaded package "PyYAML-5.3.tar.gz" into default location to make this command (/usr/bin/pip3 install PyYAML==5.3) look for it locally and not on the internet ?