0

When I install djangorestframework-simplejwt 4.6.0 in Django and try to deploy it to Heroku, I get the following error:

remote:          Downloading djangorestframework-3.12.2-py3-none-any.whl (957 kB)
remote:        ERROR: Could not find a version that satisfies the requirement djangorestframework-simplejwt==4.6.0 (from -r /tmp/build_5927f5b0/requirements.txt (line 19)) (from versions: 1.0, 1.1, 1.2, 1.2.1, 1.3, 1.4, 1.5.1, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.1, 3.0, 3.1, 3.2, 3.2.1, 3.2.2, 3.2.3, 3.3, 4.0.0, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.2.0, 4.3.0, 4.4.0)
remote:        ERROR: No matching distribution found for djangorestframework-simplejwt==4.6.0 (from -r /tmp/build_5927f5b0/requirements.txt (line 19))

I tried installing and deploying 4.4.0 to see if I could find 4.6.0, and I was able to deploy it, but when I tried to start and access it with python manage.py runserver, the 'str' object has no attribute 'decode'.

Why does this happen? I would appreciate it if you could tell me how to feed them.

tripleee
  • 175,061
  • 34
  • 275
  • 318
space_pok
  • 179
  • 11

1 Answers1

0

Change your python runtime in heroku to version 3.7 or above. I had a similar issue, so create a runtime.txt file in your root folder of your django project and specify the version of python you want example for me its python-3.8.11.