[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 FreeTop 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
Top GitHub Comments
Hello @MichelML and @maclandrol
I did
pip uninstall rdkit-pypi
to leaverdkit
remaining in the env as you advised.But…things started to break and I couldn’t even do
import rdkit.Chem.rdchem as rdchem
any more D:So…I did a fresh install of rdkit in a new env, then
conda install -c conda-forge datamol
.After that, importing
datamol
was no problem 😃Thanks a lot for your speedy help
@adelenelai Confirmed. The rdkit from
pypi
does not package the ‘Contrib’ module, thus it cannot be imported.In your case, the interpreter is picking up the
rdkit-pypi
over 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-reinstall
mamba install rdkit -c conda-forge --force-reinstall
As a side note, remember that if you install
datamol
from conda-forge, you don’t need to installrdkit
anymore.@hadim , we should remove anything that links to
contrib
from the__init__
for cases like this.