oracle/oci-cli

"OCI cli" pip error during Offline installation on RHEL

infomixinfo opened this issue · 8 comments

While installing "OCI CLI" (tried two versions, oci-cli-3.32.0-CentOS-8-Offline.zip and oci-cli-3.35.0-Oracle-Linux-8-Offline.zip)
getting the following error.

ERROR: Could not find a version that satisfies the requirement cryptography<42.0.0,>=3.2.1 (from oci-cli) (from versions: none)
ERROR: No matching distribution found for cryptography<42.0.0,>=3.2.1

The following Cryptography package is installed on the server.

$ rpm -qa|grep -i cryptography
python2-cryptography-1.7.2-2.el7.x86_64
python36-cryptography-3.2.1-1.el7.x86_64

Is there a way to fix this issue offline? Because the server cannot have internet access at this point.

Thanks in advance for any help and suggestions!

You need to install cryptography package for python, if you run pip3 list, you will see what packages installed
Need to be Python3.

Thanks @adizohar for the suggestions
@infomixinfo can you try the above suggestion and share?

Thank you for the suggestions @adizohar

The following packages are already installed.

$ rpm -qa|grep -i cryptography
python2-cryptography-1.7.2-2.el7.x86_64
python36-cryptography-3.2.1-1.el7.x86_64

And python 3.0 is being picked during the install.

python3 ./install.py --offline-install
-- Verifying Python version.
-- Python version 3.6.8 okay.

And pip3 list shows the package as well.
cryptography (3.2.1)

Thanks

I installed Centos 8 and follow offline installation, below output
It installed cryptography-40.0.2

Installed CentOs 8

[opc@templinux ~]$ python3 -V
Python 3.6.8

[opc@templinux ~]$ rpm -qa|grep -i cryptography
python3-cryptography-3.2.1-6.el8.x86_64

wget https://github.com/oracle/oci-cli/releases/download/v3.35.0/oci-cli-3.35.0-Oracle-Linux-8-Offline.zip
unzip oci-cli-3.35.0-Oracle-Linux-8-Offline.zip
cd oci-cli-installation
bash install.sh --offline-install

Installing collected packages: pycparser, cffi, zipp, typing-extensions, six, cryptography, wcwidth, pytz, python-dateutil, pyOpenSSL, importlib-metadata, circuitbreaker, certifi, terminaltables, PyYAML, prompt-toolkit, oci, jmespath, click, arrow, oci-cli
Successfully installed PyYAML-6.0.1 arrow-1.2.3 certifi-2023.7.22 cffi-1.15.1 circuitbreaker-1.4.0 click-8.0.4 cryptography-40.0.2 importlib-metadata-4.8.3 jmespath-0.10.0 oci-2.114.0 oci-cli-3.35.0 prompt-toolkit-3.0.29 pyOpenSSL-23.2.0 pycparser-2.21 python-dateutil-2.8.2 pytz-2023.3.post1 six-1.16.0 terminaltables-3.1.0 typing-extensions-4.1.1 wcwidth-0.2.8 zipp-3.6.0

Completed

Thanks for the reply, adizohar

The packages I have tried so far on "Red Hat Enterprise Linux Server release 7.9 (Maipo)" are,
oci-cli-3.32.0-CentOS-8-Offline.zip
oci-cli-3.35.0-Oracle-Linux-8-Offline.zip

And the installed package for Python 3.6.8 is,
python36-cryptography-3.2.1-1.el7.x86_64

Should I try with any other oci-cli package for RHEL?

Thanks

You are running on RHEL 7 therefore, you should try the linux 7 packages
The latest one with 7 is oci-cli-3.34.0-CentOS-7-Offline.zip
or
oci-cli-3.33.4-Oracle-Linux-7.9-Offline.zip

Yes. I was able to install OCI using, oci-cli-3.33.4-CentOS-7-Offline.zip successfully.
Thank you for the valuable suggestions!

This is great, thank you , if all worked out, can you please close the ticket ?