rdkit: error "The kernel appears to have died. It will restart automatically" when import rdkit in the jupyter notebook

Description: When I import rdkit in the jupyter notebook, the error pops out a few days ago. However, it work normally before this. But, I also found that it work normally on the terminal. Is anyone suffer this problem?

  • RDKit Version: 2018.03.3
  • Platform: jupyter notebook
Your code sample herefrom rdkit.Chem import AllChem
from rdkit import Chem
from rdkit.Chem import Draw
import pandas 
data_smile = pandas.read_csv('test.csv',usecols=[0],header=0)

dict = {}   
def ECFP(row):
    try:
        m = Chem.MolFromSmiles(row['smiles'])
        print(row['smiles']+"is succeed")
        info={}
        fp = AllChem.GetMorganFingerprintAsBitVect(m,2,nBits=512,bitInfo=info)
        print(info)
        for bit in info:
            for i in info[bit]:
                env = Chem.FindAtomEnvironmentOfRadiusN(m,i[1],i[0])
                amap={}
                submol=Chem.PathToSubmol(m,env,atomMap=amap)
                smile = Chem.MolToSmiles(submol)
                dict[bit] = smile
    except:
        print(row['smiles']+"fails!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
    
            
data_smile = data_smile.apply(ECFP, axis=1)

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 1
  • Comments: 15 (4 by maintainers)

Most upvoted comments

@MichaelKnight4714 : please install the rdkit from conda-forge; we don’t keep the builds in the rdkit channel up to date. If you still have the problem after doing that, please paste in the contents of your conda environment and let us know which operating system you’re using