0

I am new to python.. I am not able to import pyodbc I am getting an error in eclipse (just for this import) i install pyodbc

C:\Users\app_rahavm>pip install pyodbc
Requirement already satisfied: pyodbc in c:\users\app_rahavm\appdata\local\programs\python\python36-32\lib\site-packages

python interpeter is also updated with the path:

click here to see picture from eclipse

and still i am getting

Unresolved import: pyodbc

when i write this:

import pyodbc

i also see this package under packages

click here to see

any ideas?

another thing i notice is that each install package has it's own .dist-info lib but i have only dist-info file which does not hav python files inside see image here see content of lib here

RMagen
  • 612
  • 2
  • 9
  • 23

3 Answers3

1

just to update (if some else might need it... ) after spending alot of time on this ... the error is just a displayed error !! the code is running even with this error , this is very wierd but this is the case... also it is possible to press cntl + 1 and in the pop up screen choose "UnresolvedImport"

or just add at the end of the import - this will remove the red error and will do the import...

import pyodbc # @UnresolvedImport

RMagen
  • 612
  • 2
  • 9
  • 23
0

Delete my old interpreter in Preferences > PyDev > Interpreters, and creating a new interpreter called "python" which had the correct paths. After quitting and reopening eclipse, pydev found all my modules.

See

Pydev say, "Unresolved import" error

Akshay Bahadur
  • 497
  • 4
  • 11
0

Try pip freeze command to check whether the module is really present in the list of installed modules or not.

eiram_mahera
  • 950
  • 9
  • 25