I currently have virtualenv created using virtualenvwrapper. In this virtualenv, I installed the cx_Oracle extension with pip install cx_Oracle.
I have a python script using several commands from cx_Oracle such as connect, etc.
When you run my script, it is considered activated env (python script.py), it works fine and does not produce errors.
But when I try to run the same script in PyCharm 4, it does not work. I have virtualenv as the selected intrepeter. When I run the script, I get an error message as follows:
/Users/pgerrits/.virtualenvs/siebelaudit/bin/python3.4 -u /Applications/PyCharm.app/Contents/helpers/pydev/pydev_run_in_console.py 64420 64421 /Users/pgerrits/PycharmProjects/SiebelAudit/Audit/Siebel Audit/scratchpad.py Running /Users/pgerrits/PycharmProjects/SiebelAudit/Audit/Siebel Audit/scratchpad.py PyDev console: starting. ImportError: dlopen(/Users/pgerrits/.virtualenvs/siebelaudit/lib/python3.4/site-packages/cx_Oracle.so, 2): Library not loaded: /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1 Referenced from: /Users/pgerrits/.virtualenvs/siebelaudit/lib/python3.4/site-packages/cx_Oracle.so Reason: image not found
When I run a script with the same command in a terminal with env enabled, I do not get an error.
I already tried the following: - Added ENV variables for oracle_home, etc. Using script - added env variables using pyvarm env variable options
It's really annoying that I have to switch to my terminal for Mac and debugging. Anyone tell me what could be the problem here?
python virtualenv pycharm virtualenvwrapper cx-oracle
Patrick gerrits
source share