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
  • 44,105
  • 12
  • 114
  • 143
Big_Ozzy
  • 275
  • 4
  • 13

2 Answers2

12

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

Big_Ozzy
  • 275
  • 4
  • 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
  • 380
  • 1
  • 3
  • 16