Open langmore opened 10 years ago
try installing Pillow - a better.more stable fork of PIL http://pillow.readthedocs.org/en/latest/
if that is good we can put Pillow in requirements
another option is to use this perl based unix util, but the requires another outside dependency which so far seems pretty easy to install (as long as you have perl)
pillow
didn't work. It was actually already installed.
This might be already obvious, but this incompatibility is not rosetta
related. It's really just an issue with docx
compatability. I can't import docx
. The installer for docx
should specify the software it needs. Maybe just look at the code in docx
and see what's going on.
docx specifies PIL and the latest version of PIL doesn't install properly
I'm not using anaconda, but 'import Image' shows up in PIL, Pillow, matplotlib, and scipy for me. Here are some threads about it:
http://stackoverflow.com/questions/19126305/pil-image-importerror
The second link seems to say that replacing 'import Image' with 'from PIL import Image' should solve most problems (for example 'import Image' doesn't work for me, but 'from PIL import Image' does.
In my version of docx.py it has the following import statement at the top:
try: from PIL import Image except ImportError: import Image
Since the first try block works for me, I see no error. Does this mean that running 'from PIL import Image' does not work for you?
Here's a blog post about a bit of a hack that could solve this problem:
http://reinout.vanrees.org/weblog/2013/09/24/pil-pillow-image-import.html
It might work for you, but I can't really test it myself since everything seems to be importing correctly for me. Maybe anaconda has an old verion of docx or PIL or something that has this error?
For me all I needed to do was "sudo pip install --upgrade pillow". It uninstalled Pillow 2.3.2 and then reinstalled what seems to be the exact same version. Things then worked.
When
docx
is imported,docx
importsImage
(with a capitalI
). This doesn't work. It should (I believe)import image
(with lower case). This works. I haveimage
installed on my machine. I have done bothpip install image
andpip install Image
, but onlyimport image
can work. For some reason, the version ofdocx
being used saysimport Image
, which is absolutely screwball since a Python module is never named with capital letters. I recommend finding a version ofdocx
that works and then putting that inrequirements.txt
(also, there should be some way to enforce these requirements...not sure if that is set up.Traceback below.