- Windows: Windows 7 Professional
- Python: python-3.6.1-amd64.exe
- pyodbc: pyodbc-4.0.16-cp36-cp36m-win_amd64.whl
- Eclipse: Neon.3Release(4.6.3) Build id: 20170314-1500
- PyDev for Eclipse: 5.7.0201704111357
After I installed pyodbc by run pip install pyodbc-4.0.16-cp36-cp36m-win_amd64.whl, I got unresolved import pyodbc in Eclipse. So I manually added "pyodbc" under Python Interpreter > Forced Builtins and "unresolved import pyodbc" issue solved in Eclipse.
However, auto completion does not work for variable in Eclipse with Pydev. I can get auto completion for pyodbc.connect but not conn.cursor() unless I define conn = pyodbc.Connection.
Auto completion not working for variable conn
import pyodbc
if __name__ == '__main__':
conn = pyodbc.connect('Connecting String....')
cur = conn.Cursor()
Auto completion works for variable conn
import pyodbc
if __name__ == '__main__':
conn = pyodbc.Connection
conn = pyodbc.connect('Connecting String....')
cur = conn.Cursor()