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:
- extract the required dependencies
pip freeze > requirements.txt
- download the extracted dependencies in
requirement.txt
file in my Win10 machinepip 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