Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

180
Vistas
python 3.3.5 and pyodbc 2.1.7

I'm a beginner in Python.

I have a linux Redhat 4.4 server.It has python2.6 by default. I installed pyodbc 2.1.7 and python 3 tried "import pyodbc" in python3. I got the error below.

1)Is there something like pyodbc 2.1.7 is not compatiable with python3 ? I checked the documentation for pyodbc, but did not find anything conclusive. rpm was used to install pyodbc.

2) Is pypyodbc a good workaround in this case for working with python3(like anyone has any bad experience)? I tried using pypyodbc and basic select and all works with python3 with some workaround.

Python 2.6.6 [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2

$ import sys

$ import pyodbc

$ exit()

Python 3.3.5 (default, Mar 13 2014, 20:11:10) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux

$ import sys

$ import pyodbc

Traceback (most recent call last): File "", line 1, in ImportError: dynamic module does not define init function (PyInit_pyodbc)

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

I did a try with the following and it did the trick

virtualenv vtest -- for testing purpose. Do not use it in your case

source vtest/bin/activate -- for testing purpose. Do not use it in your case

pip3 install pyodbc

Then execute your python3

import pyodbc

Make sure you are using pip3

over 4 years ago · Santiago Trujillo Denunciar

0

  1. There shouldn't be any compatibility issues between Python3 and pyodbc. That being said, there appears to have been some issues with the odbc binaries in the npm package. I recommend you install unixodbc-dev from npm and pyodbc from pip separately.
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda