1

When I try and run in cmd.exe:

pip install cx_oracle

I get: Could not find a version that satisfies the requirement...

How can I fix this. I would like to install cx_oracle==5.1.2 via pip.

fallingdog
  • 192
  • 1
  • 2
  • 17
  • If you can find the `.whl` file for this version (which I was not able to find), then you could simply download that file, and install it via `pip install file-for-cx_oracle-5.1.2.whl` – AKS Mar 23 '18 at 21:47
  • and it's `python -m pip install cx_Oracle ` (see upper case `O` rather than `o`) – AKS Mar 23 '18 at 21:48
  • or `python -m pip install cx-oracle==5.1.2` (PS: here the module name is lower case `o` and has a `-` in the name) and here are the binary downloadable files for version `5.1.2`: https://sourceforge.net/projects/cx-oracle/files/5.1.2/ It's recommended to use `-v` with pip if you need any debug/verbose installation output info. – AKS Mar 23 '18 at 21:50
  • If you download the source (.tar.gz) then just untar it first, then go to the folder where setup.py is present, then run: `python setup.py build; python setup.py install`. Source download file is here: https://sourceforge.net/projects/cx-oracle/files/5.1.2/cx_Oracle-5.1.2.tar.gz/download – AKS Mar 23 '18 at 21:53
  • I have an installer for it. which does work fine. – fallingdog Mar 23 '18 at 22:05
  • There is no matching distribution found for cx-Oracle==5.1.2. – Sijan Bhandari May 30 '18 at 04:06
  • In a comment on another answer you said you have Python 2.7. There are cx_Oracle 6 wheels available for this version. I suggest you follow the installation guide and use cx_Oracle 6: http://cx-oracle.readthedocs.io/en/latest/installation.html If you have errors, then post them here. – Christopher Jones May 30 '18 at 11:28
  • https://pypi.org/simple/cx-oracle/ – Roger Perkins Mar 09 '21 at 21:28

3 Answers3

1

If you are getting a pip version error while installing cx_Oracle like:

You are using pip version 7.1.2, however version 10.0.1 is available.

Try installing newer pip version by typing in command prompt:

python -m pip install --upgrade pip==10.0.1

And then install cx_Oracle by typing in command prompt:

python -m pip install cx_Oracle

This will most probably solve your problem :)

0

Try these: If you have .whl file for version you want, then

pip install <file-for-cx_oracle-5.1.2.whl>

Pay attention to the Upper/Lower case or _ or - in the module name, i.e.

python -m pip install cx_Oracle 

or

python -m pip install cx-oracle==5.1.2

If nothing works! then try the following:

Download the source tar zip file from here: https://sourceforge.net/projects/cx-oracle/files/5.1.2/cx_Oracle-5.1.2.tar.gz/download then,

untar it (tar -xvzpf <tarFileName.tar.gz) and go inside the folder which contains setup.py file and run:

python setup.py build; python setup.py install

Read this for more info: http://cx-oracle.readthedocs.io/en/latest/installation.html#installing-cx-oracle-5-3

AKS
  • 16,482
  • 43
  • 166
  • 258
  • Thanks for the feed back Arun. Nothing is working.... I do get a lot of warnings when I run the install. All asking me to move to a new version of python. Which I can not do because the software I support is on 2.7 – fallingdog Mar 23 '18 at 22:07
  • @fallingdog the download link I gave you, didn't the last method work by using setup.py build and install? That should have worked (assuming your OS machine has all the necessary libraries that are required by Python to work). You can try install via other ways too (rpm) etc. Here: https://sourceforge.net/projects/cx-oracle/files/5.1.2/ – AKS Mar 23 '18 at 22:23
  • Or like `phd` said, you can upgrade to use a later version if that's allowed – AKS Mar 23 '18 at 22:25
0

There are no downloadable files at PyPI for version 5.1.2. The minimal downloadable package version is 5.1.3. See https://pypi.org/simple/cx-oracle/. Try

pip install cx_oracle==5.1.3
phd
  • 82,685
  • 13
  • 120
  • 165