[ERROR] Runtime.ImportModuleError: Unable to import module 'app': No module named 'sascorer' Traceback (most recent call last):
See original GitHub issue[ERROR] Runtime.ImportModuleError: Unable to import module 'app': No module named 'sascorer' Traceback (most recent call last):
Posting so it’s logged somewhere.
Is this a new dependency for datamol? Disclaimer, I didn’t update datamol in my project (lambdomics) since a couple months (I was at 0.5 before upgrading). sascorer seems to have appear in commit 8576d4b with the descriptors module, and this module is imported by default when using import datamol as dm .
sascorer seems to be a module coming from RDKit but I’m not sure. Is it just a matter of making sure to import RDKit before datamol if you use both in your project?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:14 (10 by maintainers)
Top Results From Across the Web
python - "errorMessage": "Unable to import module 'app': No ...
Now I'm getting another error saying “unable to import module app: no module named requests” My current version of python is 3.10.2 and...
Read more >ModuleNotFoundError: No module named 'rdkit.Contrib' #2279
I get the following error: ModuleNotFoundError: No module named 'rdkit.Contrib'. import rdkit from rdkit.Contrib.SA_Score.sascorer import ...
Read more >How do I resolve the "Unable to import module" error I receive ...
... the Knowledge Center article with this video: https://aws.amazon.com/premiumsupport/knowledge-center/lambda- import-module-error -python/0 ...
Read more >2021 How to Fix "No Module Named..." Error in Python
2021 How to Fix ImportError " No Module Named pkg_name" in Python! First, download the package using a terminal outside of python.
Read more >How to Fix ModuleNotFoundError and ImportError
Module imports can certainly frustrate people and especially those who are fairly new ... import aModuleNotFoundError: No module named 'a'.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hello @MichelML and @maclandrol
I did
pip uninstall rdkit-pypito leaverdkitremaining in the env as you advised.But…things started to break and I couldn’t even do
import rdkit.Chem.rdchem as rdchemany more D:So…I did a fresh install of rdkit in a new env, then
conda install -c conda-forge datamol.After that, importing
datamolwas no problem 😃Thanks a lot for your speedy help
@adelenelai Confirmed. The rdkit from
pypidoes not package the ‘Contrib’ module, thus it cannot be imported.In your case, the interpreter is picking up the
rdkit-pypiover the one from conda-forge. This happens likely because youpip install 'rdkit-pypi'AFTER installing datamol.I am not sure a simple
pip uninstall 'rdkit-pypi'would work, so instead you can either create a new env, or run the following:pip uninstall 'rdkit-pypi'mamba install datamol -c conda-forge --force-reinstallmamba install rdkit -c conda-forge --force-reinstallAs a side note, remember that if you install
datamolfrom conda-forge, you don’t need to installrdkitanymore.@hadim , we should remove anything that links to
contribfrom the__init__for cases like this.