Missing python requirement - PIL #1179

Open
cthoyt opened this Issue Nov 21, 2016 · 4 comments

Projects

None yet

2 participants

@cthoyt
cthoyt commented Nov 21, 2016

Immediately after install, this code failed:

from rdkit import Chem
from rdkit.Chem.Draw import IPythonConsole
from IPython.display import SVG
import time
print(time.asctime())

with the following error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/usr/local/lib/python3.5/site-packages/rdkit/Chem/Draw/IPythonConsole.py in <module>()
     42 try:
---> 43     import Image
     44 except ImportError:

ImportError: No module named 'Image'

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-1-5f71ef0713a1> in <module>()
      1 from rdkit import Chem
----> 2 from rdkit.Chem.Draw import IPythonConsole
      3 from IPython.display import SVG
      4 import time
      5 print(time.asctime())

/usr/local/lib/python3.5/site-packages/rdkit/Chem/Draw/IPythonConsole.py in <module>()
     43     import Image
     44 except ImportError:
---> 45     from PIL import Image
     46 
     47 from IPython.display import SVG

ImportError: No module named 'PIL'

This error was immediately fixed with pip install pillow, so my best guess is there's a problem with the requirements.txt file in the project.

@greglandrum
Member

How did you install the RDKit?

@cthoyt
cthoyt commented Nov 21, 2016

Brew install --with-python3. It installed to my brew Python 2.7.12 and brew Python 3.5.2_2

@greglandrum
Member

Great. Thanks.

@cthoyt
cthoyt commented Nov 21, 2016

So I sort of lied, because I ran python3 -m pip install pillow to fix the problem in Python 3. I don't know if there's a problem on Python 2. Sorry about the double post, but I can't edit on GitHub mobile :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment