rdkit-tutorials icon indicating copy to clipboard operation
rdkit-tutorials copied to clipboard

importing failed

Open aminemosbah opened this issue 5 years ago • 4 comments

hi i get this when trying to run the tutorial, what to we need to install rdkit in google collab ? thinks ImportError Traceback (most recent call last) in () 1 import pandas as pd ----> 2 from rdkit import Chem 3 from rdkit.Chem import PandasTools 4 from rdkit.Chem.Draw import IPythonConsole 5

ImportError: cannot import name 'Chem'


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

aminemosbah avatar Feb 22 '20 12:02 aminemosbah

Try installing RDKit with the following:

!wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh !chmod +x Miniconda3-latest-Linux-x86_64.sh !bash ./Miniconda3-latest-Linux-x86_64.sh -b -f -p /usr/local !conda install -q -y -c conda-forge rdkit

Then append rdkit path to current python system path.

import sys sys.path.append('/usr/local/lib/python3.7/site-packages/')

On Sat, Feb 22, 2020 at 4:23 AM aminemosbah [email protected] wrote:

hi i get this when trying to run the tutorial, what to we need to install rdkit in google collab ? thinks ImportError Traceback (most recent call last) in () 1 import pandas as pd ----> 2 from rdkit import Chem 3 from rdkit.Chem import PandasTools 4 from rdkit.Chem.Draw import IPythonConsole 5

ImportError: cannot import name 'Chem'

NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rdkit/rdkit-tutorials/issues/9?email_source=notifications&email_token=ADVE4OU6BOIMDJQCYSZGL5TREEKMRA5CNFSM4KZRDKH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IPPIAXQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADVE4OVTXAIRA62ZNEF5AL3REEKMRANCNFSM4KZRDKHQ .

jw-feng avatar Feb 23 '20 03:02 jw-feng

Are you sure this is the way to go with google collab ? I m trying to run rdkit on the cloud not on the local device

aminemosbah avatar Feb 23 '20 12:02 aminemosbah

Yes, see this example that was posted on the Rdkit discussion forum. https://colab.research.google.com/drive/1nQPmdEbYQgVsFr7c44yRd3wpXPEsJar3

This is what worked for me. I tried installing RDKit with apt-get on colab but that resulted in an error trying to import Chem.

JW

On Feb 23, 2020, at 4:46 AM, aminemosbah [email protected] wrote:

 Are you sure this is the way to go with google collab ? I m trying to run rdkit on the cloud not on the local device

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

jw-feng avatar Feb 23 '20 16:02 jw-feng

Thanks that’s fine

Get Outlook for iOShttps://aka.ms/o0ukef


From: JW Feng [email protected] Sent: Sunday, February 23, 2020 5:42:59 PM To: rdkit/rdkit-tutorials [email protected] Cc: aminemosbah [email protected]; Author [email protected] Subject: Re: [rdkit/rdkit-tutorials] importing failed (#9)

Yes, see this example that was posted on the Rdkit discussion forum. https://colab.research.google.com/drive/1nQPmdEbYQgVsFr7c44yRd3wpXPEsJar3

This is what worked for me. I tried installing RDKit with apt-get on colab but that resulted in an error trying to import Chem.

JW

On Feb 23, 2020, at 4:46 AM, aminemosbah [email protected] wrote:

 Are you sure this is the way to go with google collab ? I m trying to run rdkit on the cloud not on the local device

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/rdkit/rdkit-tutorials/issues/9?email_source=notifications&email_token=AJ6TEN62NXAL45RCP2B6C2LREKRRHA5CNFSM4KZRDKH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMWAXEQ#issuecomment-590089106, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ6TEN5CDKEK664ZP44FL6TREKRRHANCNFSM4KZRDKHQ.

aminemosbah avatar Feb 25 '20 11:02 aminemosbah