-
-
Notifications
You must be signed in to change notification settings - Fork 403
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 import fails with "PyThreadState_Get: no current thread" #1711
Comments
In your report above you did not describe activating the conda environment. Did you do this? |
I can not seem to reproduce this now (no activation of the conda environment), and the import works as expected. |
No worries - good to hear. |
After updating to macOS 10.13.2 I'm getting this error again. I can also reproduce it in a fresh conda install on macOS 10.12.6. |
The error comes from a mismatch between the python executable and the libpython that's linked to the _openbabel.so for the module. While I understand your complaint, if you upgrade (e.g., a "fresh conda install") you need to make sure that _openbabel.so is pointing at the right libpython. otool -L /path/to/_openbabel.so I have no problems with this, either on Mac OS 10.13.2 or 10.12.6, with and without conda. These are my development environment. |
Oh, and please make sure it's the right python |
Thank you for your reply @ghutchis! I have now been able to reproduce this on three different machines, in two cases there were no previous conda installations. This is the output from
I have tried explicitly replacing the paths with absolute ones to the libraries provided by conda (with
I don't think my
|
I have reproduced @tlhr 's error on MacOS 10.12.6 with a fresh install of conda. |
@ghutchis could you show me your output from |
OK, this seems to be a bug in conda, because I'm getting the same error when trying to use rdkit. See here: rdkit/rdkit#1617 |
Environment Information
Open Babel version: 2.4.1-py36_3
Operating system and version: macOS 10.13.1 (17B48)
Steps to Reproduce
Install the conda package and import
openbabel
:conda install -c openbabel openbabel
I am aware that this error results from conflicting python versions, but I can't see how this can happen with a
conda
build. Here is the output fromotool -L
:This seems to me to be the correct libpython, I am also running this with the correct python version.
I have also tried building openbabel myself with the same result, this was the cmake command:
The text was updated successfully, but these errors were encountered: