-2

I am trying to deploy a Flask app to Redhat linux server which is not connected to the internet.

I installed Anaconda for python version 3.7 as it is the version available in my Linux server, then activate a virtual environment.

Then I followed the steps in this question Could not find a version that satisfies the requirement <package> but a lot of issues happened during the downloading steps as following:

  1. extract the required dependencies pip freeze > requirements.txt
  2. download the extracted dependencies in requirement.txt file in my Win10 machine pip download --only-binary=:all: --platform manylinux1_x86_64 --platform linux_x86_64 -r requirements.txt

It gave:

ERROR: Could not find a version that satisfies the requirement dlib==19.7.0 (from versions: none) ERROR: No matching distribution found for dlib==19.7.0

I deleted dlib from the requirement.txt then it showed the same error for gdown==3.10.0

from the pattern of errors, I thought the issue is that there is no linux version from pip in the download files, only tar.gz https://pypi.org/project/gdown/#files https://pypi.org/project/dlib/19.17.0/#files

Moreover, a lot of issues are displayed each time I deleted a dependency from the requirements.txt file

ERROR: Could not find a version that satisfies the requirement gdown>=3.10.1 (from deepface) (from versions: none)
ERROR: No matching distribution found for gdown>=3.10.1

My question, what is the best way to download dependencies to an offline server? and to manage nested dependencies in python? NOTE: here is the requirement.txt file content https://pastebin.com/2T9SLhhC

davidism
  • 121,510
  • 29
  • 395
  • 339
user1511208
  • 67
  • 1
  • 3
  • 9
  • For RedHat you would download the RPMs to a local repo and install from there. – stark Jun 27 '21 at 12:28
  • what do you mean with RPMs? @stark – user1511208 Jun 27 '21 at 13:04
  • https://stackoverflow.com/q/34873949/1216776 – stark Jun 27 '21 at 15:02
  • Have you tried it without the `--only-binary=:all:` flag? – FlyingTeller Jun 28 '21 at 07:54
  • 1
    @user1511208 I am confused, that command contains the `--only-binary` flag, my question was about omitting it. Does the error change then? – FlyingTeller Jun 28 '21 at 12:14
  • after omitting `--only-binary` flag, the error is changed ```ERROR: When restricting platform and interpreter constraints using --python-version, --platform, --abi, or --implementation, either --no-deps must be set, or --only-binary=:all: must be set and --no-binary must not be set (or must be s et to :none:).``` @FlyingTeller – user1511208 Jun 28 '21 at 12:20
  • @stark I already used virtual environment on Redhat and most of the required libraries are third parties which are not available on python system – user1511208 Jun 28 '21 at 12:29

1 Answers1

0

dlib is not a must requirement for deepface. See its required dependencies here.

johncasey
  • 1,250
  • 8
  • 14