setting up cx_Oracle

Hi, guys, I get an error in pycharm when it's trying to load cx_Oracle package
I installed cx_Oracle through pip install from within a virtual environment, set the environment variables for oracle client in the virtual environment (ORACLE_HOME, DYLD_LIBRARY_PATH and LD_LIBRARY_PATH), and I can see the values I set when I print them out by running a python script from within the IDE.  This is the error pycharm outputs to the logs:

2015-03-12 17:29:20,697 [  15795]   INFO - .skeletons.PySkeletonGenerator - Skeleton for cx_Oracle failed on /Users/mariya/environment_1/portals_env/bin/python2.7. stderr: –
Failed to process 'cx_Oracle' while nothing yet: dlopen(/Users/mariya/environment_1/portals_env/lib/python2.7/site-packages/, 2): Library not loaded: /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1
  Referenced from: /Users/mariya/environment_1/portals_env/lib/python2.7/site-packages/
  Reason: image not found

Something wrong with my environment or is it package related?
Thanks in advance for any pointers.
Comment actions Permalink
I'm running into the exact same thing. Have you found a fix for this?
Comment actions Permalink
So I found the solution in my case. I'm running a Flask/SQLAlchemy app locally on a MacBook Pro via Apache/mod_wsgi. The way I fixed it was to edit the .plist for apache and add the cx_Oracle environment variables there.

so in the command line:

sudo vim /System/Library/LaunchDaemons/org.apache.httpd.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Then after saving the file, I restarted apache and all was good with the world. Hope this helps someone.

Please sign in to leave a comment.