I am on Windows 10 Pro 64-bit Anniversary Edition using Python 3.5.2 (Anaconda 4.1.1). I download the latest Oracle 12c Instant Client instantclient-basic-windows.x64-12.1.0.2.0.zip and instantclient-sdk-windows.x64-12.1.0.2.0.zip into C:\instantclient and put C:\instantclient on my PATH. Then I download the installer cx_Oracle-5.2.1-12c.win-amd64-py3.5.exe directly from PyPI.
Now I can start an Anaconda python prompt and type import cx_Oracle and it is successful.
>>> import cx_Oracle
>>>
By when I go into my PyDev installation on Eclipse Neon (4.6), the import cx_Oracle line in my source file still shows an error as an unresolved import.
- I went into Windows > Preferences > PyDev > Interpreters > Python Interpreter and removed the Anaconda interpreter (
C:\bin\anaconda3\python.exe) and added it back. I restarted Eclipse, but no luck. - I issued a Project > Clean on all my projects and restarted Eclipse. It still shows
import cx_Oracleas an unresolved import.
How can I get PyDev to see my cx_Oracle package installation?
Note that there are a lot of supposed answers that do not work for me; I've tried all the suggestions, as indicated above.
import sys; print(sys.executable)in both consoles (anaconda and eclipse) to be sure your setting has an effect?C:\bin\anaconda3\python.exe. (I had no idea that PyDev had an interactive console---very neat. Thank for the tip.)print(cx_Oracle.__file__)to see where it is located?C:\bin\anaconda3\lib\site-packages\cx_Oracle.cp35-win_amd64.pyd.import cx_Oraclein the pydev console (now that you know there's one), respecting the case, and see what happens (getting desperate here)