Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

179
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda