June 24th, 2013, 03:55 PM
Pyodbc strange issue
i have posted in python.org and the pyodbc group but haven't had any luck with them yet...
I am running windows 7 pro 64 bit and python 3.3.1 64bit and this installer of pyodbc: pyodbc-3.0.6.win-amd64-py3.3
when i run from command line:
everything works great!
>>> import pyodbc
now when i create a py file: test1.py
and put it in C:\
i get an error that: ImportError: No module name pyodbc
another piece of info:
If i call python and the file..
it runs fine as well.
C:/> python C:/test1.py
What am i doing wrong in that the module is not being called in the file execution?
June 24th, 2013, 11:52 PM
I've experienced exactly the same problem with psutils and god knows how many other python modules. If you read some of my recent posts you'll see what I mean. At first I thought it was a problem with site-packages not being listed/searched in sys.path, but now I think it is a bug with that release of python.
A possible solution for the time being is to have the folder of the things you want to import in your work directory. (If you are familiar with python source, you can try to find the bug yourself and recompile).