I'm setting up a RHEL8 (8.7) based Docker container, with Python 3.8.13 installed (installed python3-pip, python3.6, python 3.8 and 3.9 too). I have tried to install some Python libraries using requirements.txt:
RUN pip3 install -r requirements.txt
The txt file is recognized, some of the requirements are found and installed, but some of them are exiting with the failure code: 1 For example, I want to install joblib 1.2.0 and numpy 1.23.2, so my requirements.txt file has the following entries too:
joblib == 1.2.0
numpy == 1.23.2
But the build exits with the following as soon as it reaches the "joblib" line:
Collecting joblib==1.2.0 (from -r requirements.txt (line1))
Could not find a version that satisfies the requirement joblib==1.2.0 (from -r requirements.txt (line1)) (from versions: 0.3.2d.dev, ..*omitting a massive list of versions*.. 1.1.0, 1.1.1)
No matching distribution found for joblib==1.2.0 (from -r requirements.txt (line1))
error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1
I have tried to install EPEL and probably install Python 3.10 or 3.11 but did not succeed, probably not supported by RHEL8. I have gone through the following checks advised for cases when pip does not find the correct version:
- pip install -r requirements.txt command is indeed running with the -r option.
- version of pip is pip3, matching the installed Python3
- name of the module is not misspelled, correct
- the listed modules are not built-in modules (they indeed have to be installed separately)
- package does support the version of Python: Joblib 1.2.0 supported Python versions are 3.7+ (as stated, 3.8 and 3.9 is installed too) Numpy 1.23.2 supported Python versions are 3.8-3.11 So these should be visible for pip3 installer - yet they are not, Joblib max offered version is 1.1.1... Is there a workaround or solution for this?