Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLL load failed while importing turbodbc_intern #315

Closed
swolfe2 opened this issue Jun 30, 2021 · 3 comments
Closed

DLL load failed while importing turbodbc_intern #315

swolfe2 opened this issue Jun 30, 2021 · 3 comments

Comments

@swolfe2
Copy link

swolfe2 commented Jun 30, 2021

Our systems team have forced an upgrade from Python 3.7 to the newest 3.9.6. I was able to successfully install turbodbc with Boost libraries. However, when I try to run an existing script that worked on Python 3.7, I get the following error:

C:\Users\UserID\Desktop\Code>"C:/Program Files/Python39/python.exe" "c:/Users/UserID/Desktop/Code/Python/Warehouse IDs.py"
Traceback (most recent call last):
  File "c:\Users\UserID\Desktop\Code\Python\Warehouse IDs.py", line 31, in <module>
    from turbodbc import connect, make_options
  File "C:\Users\UserID\AppData\Roaming\Python\Python39\site-packages\turbodbc\__init__.py", line 2, in <module>
    from .connect import connect
  File "C:\Users\UserID\AppData\Roaming\Python\Python39\site-packages\turbodbc\connect.py", line 1, in <module>
    from turbodbc_intern import connect as intern_connect
ImportError: DLL load failed while importing turbodbc_intern: A dynamic link library (DLL) initialization routine failed.

Is there something that I'm missing to get it to work with the newest version of Python?

@dhirschfeld
Copy link

You have missing or incompatible dependencies. IMO the proper solution to fix DLL load issues on Windows is to use mamba and conda-forge - that's exactly what they were designed to do. pip was never designed to install packages with complex compiled dependencies.

If you can't use conda then you may or may not be able to get information about what the problem is by inspecting the pyd file with dependencies.

@xhochy
Copy link
Collaborator

xhochy commented Jul 2, 2021

This is a duplicate of #258, would be interesting to find out the cause.

In addition to dependencies, one could also check out the newly released https://github.com/microsoft/dlltracer-python to see where this breaks.

@swolfe2
Copy link
Author

swolfe2 commented Aug 11, 2021

Hello @xhochy, apologies for the delay in response. I had to submit a request to get dlltracer to work with newer versions of Python so I could also test it. Below is a an output of the dlltracer run for turbodbc on the newest Python 3.9.6 I have on my system:
image

It would be awesome if I could get turbodbc to work with it, as it is by far the fastest method I've used to do work in MSSQL with Python.

Appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants