5

I need to install a python project on a machine without internet connection. During the creation of the deb package I downloaded all python requirements with pip download and I putted them into the deb.

When installing the deb on the machine I get errors from python packages not being found and I discovered that packages creating problems are the ones specified into the field setup_requires of setup.py files of the included packages.

For example the PyJWT package has setup_requires=['pytest-runner'] but pytest-runner is not downloaded by pip download and during the installation this gives error.

My question are:

  1. is there a way of having pip downloading all dependencies (also those on setup_requires fields)?
  2. Is this the correct workflow for creating a deb that has to be installed offline?
Red
  • 664
  • 2
  • 10
  • 20
  • Have you tried creating a `requirements.txt` from `pip freeze` and user that file with pip download: `pip download -r requirements.txt`? – Klaus D. Jun 27 '16 at 14:25
  • @KlausD. Yes, this is exactly what I've done. In a local working virtualenv of my project `pip freeze` gives not pytest-runner within the dependencies – Red Jun 27 '16 at 14:29
  • It doesn't seem to be a real package. You might try to download it manually `pip download pytest-runner` or from pypi. – Klaus D. Jun 27 '16 at 14:34
  • This answer might be helpfull: https://stackoverflow.com/questions/27307082/install-package-which-has-setup-requires-from-local-source-distributions – dannymo Feb 24 '21 at 16:13

0 Answers0