-2

Im trying to install modules (i.g. mypy) from directories on my PC using

pip install "path like C:\user\mypy.whl or .gz"

, but it always shows the error

WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000024AFFAB2B30>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tomli/

I really don't understand why does it connect to pypi.org if Im trying to install it from local dir

  • Internet connection? Try to install it in **Google Colab** or **DeepNote**, you can run python online there – Carlos Adir Jul 26 '22 at 10:56
  • Which pip Version are you using "pip -V" or "pip3 -V" (depends on your operating System and configuration) – jack Jul 26 '22 at 10:57
  • I don't have permition to internet. I've got module file from another place. I really don't know what /simple/tomli. Im trying to call pip from venv – PythonNooob Jul 26 '22 at 11:01
  • 1
    https://stackoverflow.com/search?q=%5Bpip%5D+offline – phd Jul 26 '22 at 13:30

1 Answers1

0

I actually was in your situation when I didn't have internet access and had to ship modules in wheel files. The problem is likely with dependencies here: while installing mypy.whl, it says that it requires dependencies (simply speaking, another modules in imports) such as tomli and others. So you now have to install tomli first, then all other dependencies, and remember that the dependencies can have their own dependencies. Welcome to dependency hell.

You can start with downloading tomli, transferring it to your machine and installing it. If after that you'll see some other module in the error message, you'll have to satisfy that dependency, and so on, and so forth.

Alex
  • 815
  • 9
  • 19