I'm trying to install my Python packages on an offline computer, but unfortunately when I use pip download <packagename>
or pip wheel <packagename>
it seems like it's not doing something correctly. Take for example beautifulsoup4
. On my online, machine I run pip download beautifulsoup4
and the output files are
beautifulsoup4-4.11.1-py3-none-any.whl
soupsieve-2.3.2.post1-py3-none-any.whl
Then when I move them over to the offline machine and attempt to install them with pip install .\beautifulsoup4-4.11.1-py3-none-any.whl
I get:
Processing c:\users\pk2\downloads\bs4\beautifulsoup4-4.11.1-py3-none-any.whl
Collecting soupsieve>1.2 (from beautifulsoup4==4.11.1)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000247B3D74D30>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/soupsieve/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000247B3D746A0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/soupsieve/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000247B3D74250>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/soupsieve/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000247B3D74400>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/soupsieve/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000247B3D743D0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/soupsieve/
ERROR: Could not find a version that satisfies the requirement soupsieve>1.2 (from beautifulsoup4==4.11.1) (from versions: none)
ERROR: No matching distribution found for soupsieve>1.2 (from beautifulsoup4==4.11.1)
I have had this problem with a lot of other packages as well, although not necessarily every package. For example, here is a similar issue with ffmpegio
; it's looking for pluggy
even though the pluggy-1.0.0-py2.py3-none-any.whl
is located in the same directory.
$ pip install .\ffmpegio_core-0.5.0-py3-none-any.whl
Processing c:\users\pk2\downloads\python\offline package installers 3.8.2\ffmpegio_core\ffmpegio_core-0.5.0-py3-none-any.whl
Collecting pluggy (from ffmpegio-core==0.5.0)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000020A0BF32790>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pluggy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000020A0BF32DF0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pluggy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000020A0BF32100>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pluggy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000020A0BF328E0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pluggy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000020A0BF27D60>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pluggy/
ERROR: Could not find a version that satisfies the requirement pluggy (from ffmpegio-core==0.5.0) (from versions: none)
ERROR: No matching distribution found for pluggy (from ffmpegio-core==0.5.0)
It looks like it can't find the dependences even though they are in the same folder. Is there some way to tell pip to find them? It's not like I know the dependency chain for every package I want to install, so it's impractical to figure out the correct order to install them in one-by-one (if that's what the issue is here).
I'm on Windows 10. Can somebody please help me understand how to correctly download and install these packages on machines that remain offline?