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

tohil + numpy + subinterpreters = fail #89

Open
stevel6868 opened this issue Jul 20, 2022 · 0 comments
Open

tohil + numpy + subinterpreters = fail #89

stevel6868 opened this issue Jul 20, 2022 · 0 comments

Comments

@stevel6868
Copy link

Not a tohil problem per se, but wondering if anyone has encountered this and resolved it.

I have a multithreaded Tcl program that does a bunch of calculations in each thread by tohil::call into a Python script that uses numpy. Results are fed back to Tcl via tohil.call to a Tcl proc. Works just fine with a single thread, but with multiple threads the second thread gets an error "Interpreter change detected - this module can only be loaded into one interpreter per process. (import module failed)" when running "import numpy".

It seems numpy explicitly doesn't like Python subintepreters. Does anyone have a workaround?

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

1 participant