epub icon indicating copy to clipboard operation
epub copied to clipboard

epub.py has syntax error

Open porphyry5 opened this issue 10 years ago • 3 comments

Installed epub.py from the .zip download. Attempt to run it produced this result /home/g/Downloads/epub-master # ./epub.py -h File "./epub.py", line 66 print image.Image(image_file.name) ^ SyntaxError: invalid syntax

I know nothing about python, could you kindly advise me of the problem here. I have installed python2-beautifulsoup3-3.2.1-3 and python3.4.2 on arch linux mainline 3.18.1

porphyry5 avatar Jan 05 '15 18:01 porphyry5

you're using python 3 and this is written in python 2.

You may need to install python2. Also, on Arch, you may need to change line one of epub.py to #!/usr/bin/env python2

rupa avatar Jan 06 '15 20:01 rupa

Many thanks, I guess that explains why I have python 2.7 as well as 3.4 on my system, already installed.

On Tue, Jan 6, 2015 at 12:29 PM, rupa [email protected] wrote:

you're using python 3 and this is written in python 2.

You may need to install python2. Also, on Arch, you may need to change line one of epub.py to #!/usr/bin/env python2

— Reply to this email directly or view it on GitHub https://github.com/rupa/epub/issues/13#issuecomment-68928314.

Graham Lawrence

porphyry5 avatar Jan 07 '15 17:01 porphyry5

Yeah you need to use python2 instead of python3 run this with $ python epub.py <arguments> instead of $ python3 epub.py <arguments> May be this can help you install python2 :small_red_triangle: :smile_cat: :smiley_cat:

arpit1997 avatar Oct 30 '16 09:10 arpit1997