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

SystemError: initialization of rdchem raised unreported exception #65

Closed
clefourrier opened this issue Nov 18, 2022 · 5 comments
Closed

Comments

@clefourrier
Copy link

Hi,
I'm using Python 3.8.10, and trying to import rdchem using from rdkit.Chem import rdchem, with rdkit 2022.9.1, on Ubuntu 20.04.5.

It fails with SystemError: initialization of rdchem raised unreported exception and no other indication.
The command python -c "from rdkit import Chem; print(Chem.MolToMolBlock(Chem.MolFromSmiles('C1CCC1')))", on the other hand, works fine.

@kuelumbus
Copy link
Owner

Hi, I can't repo this on my Ubuntu or Debian machine. It works fine. Can you tell me a bit more about your environment and system configuration? Do you work in a conda environment? Do you work on an HPC system? What numpy version are you using?

Maybe related: https://www.mail-archive.com/rdkit-discuss@lists.sourceforge.net/msg09794.html and rdkit/conda-rdkit#57

@clefourrier
Copy link
Author

clefourrier commented Nov 18, 2022

Env: I'm on a Dell Precision 5560, running under Ubuntu 20.04.5.
I'm launching this from a venv, that I manage with pip (so no conda).
My numpy version is 1.23.0. Edit: going back to numpy 1.12 would break all the other depencies I need for my config.

I initially noticed the problem by trying to import packages from ogb, which depends on rdkit.

I managed to get slightly more detail:

SystemError                               Traceback (most recent call last)
----> 1 from rdkit.Chem import rdchem

File venv/python3.8/site-packages/rdkit/Chem/__init__.py:20, in <module>
     18 from rdkit import DataStructs
     19 from rdkit.Geometry import rdGeometry
---> 20 from rdkit.Chem import rdchem
     21 _HasSubstructMatchStr = rdchem._HasSubstructMatchStr
     22 from rdkit.Chem.rdchem import *

SystemError: initialization of rdchem raised unreported exception

@clefourrier
Copy link
Author

Edit: must be a problem from my config somewhere, closing

@kuelumbus
Copy link
Owner

Ok. Let me know if you need further help.

@clefourrier
Copy link
Author

So, for further archive, removing the shebang #!/bin/python3 which started my file solved it (no idea why).

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

2 participants