question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SyntaxError: invalid syntax with python2

See original GitHub issue
Traceback (most recent call last):
  File "/usr/local/bin/packt-cli", line 6, in <module>
    from packtPublishingFreeEbook import packt_cli
  File "/usr/local/lib/python2.7/dist-packages/packtPublishingFreeEbook.py", line 248
    end="", )
       ^
SyntaxError: invalid syntax

THe readme suggest pip but this in Debian means that will use python2, install with pip3 use python3 and now works.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
Mte90commented, Apr 9, 2019

I think that if we write pip3 for install is the best option so is clear for everyone, for who has knowledge of python and also for newbie that copy and paste commands.

0reactions
mjenczmykcommented, Apr 9, 2019

Resolved by #152.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid Syntax in Python: Common Reasons for SyntaxError
The interpreter will find any invalid syntax in Python during this first stage of program execution, also known as the parsing stage. If...
Read more >
How to Fix Invalid SyntaxError in Python - Rollbar
The Python SyntaxError occurs when the interpreter encounters invalid syntax in code. When Python code is executed, the interpreter parses ...
Read more >
python - Why do I get the syntax error "SyntaxError: invalid ...
When an error is reported on a line that appears correct, try removing (or commenting out) the line where the error appears to...
Read more >
SyntaxError: invalid syntax - Python Morsels
This is Python's way of saying "I don't understand you". Python knows that what you've typed isn't valid Python code but it's not...
Read more >
SyntaxError in Python: How to Handle Invalid Syntax in Python
In summary, SyntaxError Exceptions are raised by the Python interpreter when it does not understand what operations you are asking it to perform ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found