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_Oracle
as 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? – VaenfilaC:\bin\anaconda3\python.exe
. (I had no idea that PyDev had an interactive console---very neat. Thank for the tip.) – Spunkyprint(cx_Oracle.__file__)
to see where it is located? – VaenfilaC:\bin\anaconda3\lib\site-packages\cx_Oracle.cp35-win_amd64.pyd
. – Spunkyimport cx_Oracle
in the pydev console (now that you know there's one), respecting the case, and see what happens (getting desperate here) – Vaenfilaimport cx_Oracle
within the pydev console --- that's how I was able toprint(cx_Oracle.__file__)
as you requested above. :) – SpunkyCtrl+Click
on it takes me nowhere. Here, see this screen shot: https://mcmap.net/q/1471714/-pydev-does-not-recognize-imports/421049 – Spunkysetup.py
in related module and seedefault python directory check
function. You need add Anaconda path name toSYS ENV
or vice versa... Or copy/softlink related module to Anaconde library directory. – Vernalizecx_Oracle.cp35-win_amd64.pyd
insite-packages
after installation and has no stub. I never had problems with running the programs though. – Calesta