Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!