I just installed QGIS Wien 2.8.1, first the OSGEO4W Installer and later the standalone installer (32bits) and when I write import pyodbc on the Python console I get a message that the dll was not found, I did this on another computer (same bitness) and the same thing happens. However, when I use another computer which has QGIS 2.2 Valmiera (standalone installation 32 bit) and yet another which has 2.4 Chugiak (standalone installation 32 bit), import pyodbc works. I have not tried on 2.6. All computers have Windows 7.
3 Answers
Actually, we have tested both 32 bits and 64 bits installers for QGIS 2.8.1 Wien on the same computer with an extended cleanup between the two installation and:
- import pyodbc is working perfectly on the 64 bits version
- import pyodbc doesn't work on the 32 bits version
Since the installers don't seem to work in the same way (long postscript and a reboot required on the 32 bits version), I fear that there's something that goes wrong during the installation of the 32 bits version.
Pyodbc is not installed by default, you need to select it from the libs section of the advanced installation option in OSGeo4W. Works for me on Win7 as you can see here:
-
-
Hi Underdark,I tried your answer but when I re-run the installer it shows that it is already installed (Current: 3.0.2-2, New: keep). Besides, what it is to be done when one does want to use the standalone installer, that with previous versions worked well ?– nanungaCommented Mar 19, 2015 at 20:24
-
So the lib is installed, but python in the OSGeo shell cannot find it? Commented Mar 19, 2015 at 20:27
-
Hi, I am sorry, does it work for you when you open qgis and then the python console and try to type the command there?– nanungaCommented Mar 19, 2015 at 22:04
Bump. Same problem here :( anyway I think pyodbc should be installed by default.
- It was there and we ware using it (at least some of us)
- QtSQL is even slower for some ODBC connections (tested on *.mdb)
- that's it :)