Skip to content

ModuleNotFoundError: No module named 'rdkit.Contrib' #2279

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

Closed
sayred1 opened this issue Feb 16, 2019 · 5 comments
Closed

ModuleNotFoundError: No module named 'rdkit.Contrib' #2279

sayred1 opened this issue Feb 16, 2019 · 5 comments

Comments

@sayred1
Copy link

sayred1 commented Feb 16, 2019

Description:
I installed rdkit using conda and can activate my environment just fine.

  • RDKit Version: 2018.09.1
  • Platform: MacOS

I am attempting to run already existing code that makes use of the contrib module, however, the import below won't work for me. I get the following error:
ModuleNotFoundError: No module named 'rdkit.Contrib'

import rdkit
from rdkit.Contrib.SA_Score.sascorer import calculateScore
@iwatobipen
Copy link
Contributor

iwatobipen commented Feb 16, 2019 via email

@sayred1 sayred1 closed this as completed Feb 17, 2019
@sayred1
Copy link
Author

sayred1 commented Feb 17, 2019

@iwatobipen worked like a charm! I am curious about something though. Why can't one directly import Contrib ('from rdkit import Contrib') as Chem is imported ('from rdkit import Chem')?

@iwatobipen
Copy link
Contributor

iwatobipen commented Feb 17, 2019 via email

@greglandrum
Copy link
Member

@iwatobipen is completely right here. The contrib modules aren’t generally as well tested and aren’t “supported” per se, so they aren’t automatically made available on PYTHONPATH

@sayred1
Copy link
Author

sayred1 commented Feb 19, 2019

@iwatobipen @greglandrum, thank you both for your quick help, cheers!

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