"SyntaxError: invalid syntax" in method 'convert' (pip) #32

Closed
opened 2021-04-25 19:57:52 +00:00 by josch · 0 comments
Owner

By Romiras on 2017-01-28T15:40:19.227Z

Installed package with "sudo pip install img2pdf" on Ubuntu 14.04.

$  img2pdf 
Traceback (most recent call last):
  File "/usr/local/bin/img2pdf", line 9, in <module>
    load_entry_point('img2pdf==0.2.3', 'console_scripts', 'img2pdf')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.7/dist-packages/img2pdf.py", line 981
    def convert(*images, title=None,
                             ^
SyntaxError: invalid syntax

It looks like used Python version 2.7 instead of Python3. I'm not Python developer.


By Romiras on 2017-01-28T15:54:27.116Z


Status changed to closed


By Romiras on 2017-01-28T15:54:27.325Z


I should have been used "sudo pip3 install img2pdf" instead. Sorry!


By josch on 2017-01-28T17:59:22.409Z


No problem. I see the README still talks about pip instead of pip3. That's probably where your troubles came from?


By Romiras on 2017-01-28T18:02:37.410Z


@josch sure. Documentation should be clear about this.


By josch on 2017-01-28T18:09:49.212Z


Fixed in commit 45cea44f.

*By Romiras on 2017-01-28T15:40:19.227Z* Installed package with "sudo pip install img2pdf" on Ubuntu 14.04. ``` $ img2pdf Traceback (most recent call last): File "/usr/local/bin/img2pdf", line 9, in <module> load_entry_point('img2pdf==0.2.3', 'console_scripts', 'img2pdf')() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "/usr/local/lib/python2.7/dist-packages/img2pdf.py", line 981 def convert(*images, title=None, ^ SyntaxError: invalid syntax ``` It looks like used Python version 2.7 instead of Python3. I'm not Python developer. --- *By Romiras on 2017-01-28T15:54:27.116Z* --- Status changed to closed --- *By Romiras on 2017-01-28T15:54:27.325Z* --- I should have been used "sudo pip3 install img2pdf" instead. Sorry! --- *By josch on 2017-01-28T17:59:22.409Z* --- No problem. I see the README still talks about `pip` instead of `pip3`. That's probably where your troubles came from? --- *By Romiras on 2017-01-28T18:02:37.410Z* --- @josch sure. Documentation should be clear about this. --- *By josch on 2017-01-28T18:09:49.212Z* --- Fixed in commit 45cea44f.
josch closed this issue 2021-04-25 19:57:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: josch/img2pdf#32
No description provided.