0

Is it possible to do an offline installation of a package with a dependency link, e.g.:

setup(
    name='package',
...
    install_requires=[
        '<dependency> @ git+ssh://git@github.com/<user>/<repo_name>@<branch>'
    ],
)

I'd like to add this into a package I am creating, but it seems to cause problems when installing while offline. For some reason pip still attempts to connect to the repo even if the dependency is already installed.

Is using the --no-deps option the only way to install this package offline?

zachm0
  • 41
  • 4
  • For offline installation `install_requires` is a wrong solution. Declare the names of dependencies in `requirements.txt` and go for [offline installation](https://stackoverflow.com/a/14447068/7976758). See https://stackoverflow.com/search?q=%5Bpip%5D+offline – phd Apr 20 '22 at 20:45
  • That seems like the way to go, but then I don't get the benefit of automatic dependency installation when the PC has access to the internet :( Oh well – zachm0 Apr 21 '22 at 23:42

0 Answers0