rdkit / conda-rdkit

Conda build recipe for the rdkit
50 stars 30 forks source link

Issues with pandas on Ubuntu. #90

Closed alvesvm closed 4 years ago

alvesvm commented 4 years ago

I have just installed rdkit through conda in two different machines—one with Windows 10 and another one with Ubuntu 18.04. The environment in Windows runs well just out of the box. But the environment in Ubuntu is producing an 'NoneType' object has no attribute 'core' error (see below).

Conda installed pandas 1.0.1 on my windows machine. I was able to fix the issue on my Ubuntu machine, reverting pandas to version 0.23.4. Is there a better solution?

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-b77fb46287cc> in <module>
      3 
      4 # Read SDF
----> 5 moldf = PandasTools.LoadSDF(file);
      6 # Rename ROMol
      7 moldf = moldf.rename(columns={'ROMol': 'Mol'})

~/anaconda3/envs/my-rdkit-env/lib/python3.6/site-packages/rdkit/Chem/PandasTools.py in LoadSDF(filename, idName, molColName, includeFingerprints, isomericSmiles, smilesName, embedProps)
    358   if close is not None:
    359     close()
--> 360   RenderImagesInAllDataFrames(images=True)
    361   return pd.DataFrame(records, index=indices)
    362 

~/anaconda3/envs/my-rdkit-env/lib/python3.6/site-packages/rdkit/Chem/PandasTools.py in RenderImagesInAllDataFrames(images)
    282   '''
    283   if images:
--> 284     pd.core.frame.DataFrame.to_html = patchPandasHTMLrepr
    285   else:
    286     pd.core.frame.DataFrame.to_html = defPandasRendering

AttributeError: 'NoneType' object has no attribute 'core'
greglandrum commented 4 years ago

@alvesvm : the line numbers in those exceptions don't correspond to the current RDKit release (2020.03.1). Which version do you have installed and where did you install it from? You can answer this question with: conda list | grep rdkit

alvesvm commented 4 years ago

I had RDKit release 2017.09.1. But I installed RDKit following the website recommendations, as I have always done: I installed the latest version of Anaconda and then installed RDKit using conda create -c rdkit -n my-rdkit-env rdkit. I first tried to update it using conda install -c conda-forge rdkit, also expressed in the RDKit website. But then running conda install -c rdkit rdkit as stated in the Anaconda website, the release 2020.03.1 was successfully installed. Thanks!