3

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

vaultah
  • 40,483
  • 12
  • 109
  • 137
Big_Ozzy
  • 265
  • 3
  • 13

2 Answers2

12

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

Big_Ozzy
  • 265
  • 3
  • 13
8

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.

Julian Wise
  • 342
  • 1
  • 3
  • 14