Big_Ozzy
Big_Ozzy

Reputation: 275

SyntaxError:Invalid Syntax on python import JWT

I am trying to import the package JWT into Python 2.7 and I am getting a SyntaxError: invalid syntax. What can I do to fix this?

enter image description here

Upvotes: 3

Views: 5311

Answers (2)

Julian Wise
Julian Wise

Reputation: 378

The logical thing to install jwt on Python 2 is:

pip install jwt

Which lead to the error.

The correct install which worked on my side is:

pip install PyJWT

and it worked.

Upvotes: 8

Big_Ozzy
Big_Ozzy

Reputation: 275

I was trying install jwt for Python 3 when I needed the package Pyjwt for Python 2.7

Upvotes: 12

Related Questions