0

Have few python scripts and API that I want to deploy to PCF. During build process I get this error and the container is destroyed at the end. Do you know how to get around this. Sounds like cx_Oracle needs Oracle client presence. -----> Installing python-2.7.11 Downloaded [file:///tmp/buildpacks/3e091922d73fa9260b32ad7737d842e3/dependencies/https___pivotal-buildpacks.s3.amazonaws.com_concourse-binaries_python_python-2.7.11-linux-x64.tgz] $ pip install -r requirements.txt Collecting Flask==0.12 (from -r requirements.txt (line 1)) Downloading Flask-0.12-py2.py3-none-any.whl (82kB) Collecting cx-Oracle (from -r requirements.txt (line 2)) Downloading cx_Oracle-5.3.tar.gz (129kB) Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-8i1use/cx-Oracle/setup.py", line 174, in raise DistutilsSetupError("cannot locate an Oracle software " \ distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation

           ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8i1use/cx-Oracle/

2 Answers2

1

cx_Oracle is not an option on PCF at this time. You should use JDBC (ojdbc.jar) connection mechanism instead. It's light weight.

0

Yes, cx_Oracle needs an Oracle client. The instant client, however, is easily deployed. See the download page here: http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html. Instructions are included at the bottom of the page. You will need either the "Basic" or "Basic Light" package at runtime and the "SDK" package to compile and build.

Anthony Tuininga
  • 6,388
  • 2
  • 14
  • 23
  • I am told installing oracle client on PCF is not an option because o it's size (fat client). I went with ojdbc.jar (JDBC connection) and I deployed the app to PCF successfully. App is up and the API is running. Now I am trouble shooting the execution errors. PCF doesn't give you a good way to see what files are deployed. May it's my enterprise specific restriction (?). – Madhu Venkat Mar 24 '17 at 03:43
  • The smallest you can get an Oracle client is about 30 MB. So if that is too large you're out of luck. – Anthony Tuininga Mar 24 '17 at 21:24