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

Python API import error on Windows and Python 3.8+ with Intel TBB #300

Open
utilForever opened this issue Jun 30, 2020 · 10 comments
Open

Python API import error on Windows and Python 3.8+ with Intel TBB #300

utilForever opened this issue Jun 30, 2020 · 10 comments

Comments

@utilForever
Copy link
Collaborator

I encountered Python API import error while updating CubbyFlow.

import pyjet
ImportError: DLL load failed while importing pyjet:
The specified module could not be found. 

At first, I thought it was my problem, but after a few days of investigation, I found that there is a new Windows safety feature that changes how DLLs are loaded in Python 3.8.
To resolve this issue, I needed to tell Python how to find the library again like this:

import os
os.add_dll_directory(r'C:/Intel/tbb/bin/intel64/vc14') << (The path that Intel TBB is located)
import pyjet

I think we should add this situation and solution to README.md or INSTALL.md. What do you think?

@doyubkim
Copy link
Owner

Is this still an issue if PATH env variable contains TBB?

@utilForever
Copy link
Collaborator Author

Yes, it is.

@doyubkim
Copy link
Owner

Ok that’s unfortunate 🙁 I’m starting to think if pyjet should use tbb from pypi. Having extra function call for every pyjet import doesn’t look nice.

@utilForever
Copy link
Collaborator Author

I agree. So I suggest adding this issue to documents such as README.md or INSTALL.md. 🤔

@doyubkim
Copy link
Owner

It should be a temporary warning message in the docs before we have proper fix. Do you mind posting a PR for that?

@utilForever
Copy link
Collaborator Author

Yes, I’ll post PR tonight. :)
Do you want to add warning messages to Install.md?

@doyubkim
Copy link
Owner

doyubkim commented Aug 2, 2020

@utilForever Not sure why I missed your last comment. Yup, that sounds good!

@utilForever
Copy link
Collaborator Author

@doyubkim Okay. I'll post PR tonight after I add warning messages. 😀

@doyubkim
Copy link
Owner

doyubkim commented Aug 2, 2020

I'm also making some experiments to address general distribution issues with TBB. I think we should build and deploy the version of TBB that's been used with the Jet build. Hope I can come up with something to share soon.

@utilForever
Copy link
Collaborator Author

@doyubkim Not sure why I missed this issue. I'll post PR tonight after work. 📜

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

No branches or pull requests

2 participants