Reputation: 1227
Hello I am running Python 2.7 64 bit on windows 7. I've found a python script online called img2pdf.py which could be very useful to me but I can't run it. I've installed the Pillow library for win64 (from http://www.lfd.uci.edu/~gohlke/pythonlibs/) and Image.py is present in "C:\Python27\Lib\site-packages\PIL"
I've downloaded the script to a directory containing my image, and python is on my path but when I type
python img2pdf.py myimage.j2k
at the command prompt I get an error that states
Traceback (most recent call last):
File "img2pdf.py" line 18, in <module>
import Image
ImportError: No module named Image
What have I missed?
Upvotes: 0
Views: 4459
Reputation: 1
pip.exe install ..\Sources\img2pdf
Upvotes: 0
Reputation: 483
On the Pillow library link, it is written:
Note: use
from PIL import Image
instead ofimport Image
.
But when I look to the img2pdf.py script that I've found here, it is written import Image
. So I guess you have to edit your img2pdf.py as specified above.
Upvotes: 2