I am new to Python and Heroku. When I run the python app in heroku, I am getting below error. I tried to run the app locally and it works fine. Can anyone please help me, how to fix this.
(myvenv) C:\Users\pc\Desktop\user1\heroku_captsone>heroku run python manage.py db upgrade test-app
» Warning: heroku update available from 7.53.0 to 7.60.2.
Running python manage.py db upgrade test-app on ⬢ test-app... up, run.8455 (Free)
Traceback (most recent call last):
File "manage.py", line 4, in <module>
from app import app
File "/app/app.py", line 12, in <module>
from auth.auth import *
File "/app/auth/auth.py", line 5, in <module>
from jose import jwt
File "/app/.heroku/python/lib/python3.7/site-packages/jose/jwt.py", line 11, in <module>
from jose import jws
File "/app/.heroku/python/lib/python3.7/site-packages/jose/jws.py", line 8, in <module>
from jose import jwk
File "/app/.heroku/python/lib/python3.7/site-packages/jose/jwk.py", line 10, in <module>
from jose.backends.base import Key
File "/app/.heroku/python/lib/python3.7/site-packages/jose/backends/__init__.py", line 3, in <module>
from jose.backends.pycrypto_backend import RSAKey
File "/app/.heroku/python/lib/python3.7/site-packages/jose/backends/pycrypto_backend.py", line 7, in <module>
from Crypto.PublicKey import RSA
File "/app/.heroku/python/lib/python3.7/site-packages/Crypto/PublicKey/RSA.py", line 137
e, d, n, p, q, u = [self._key[comp] for comp in 'e', 'd', 'n', 'p', 'q', 'u']
^
SyntaxError: invalid syntax
Below is the requirements.txt file
alembic==1.4.2
aniso8601==6.0.0
astroid==2.2.5
autopep8==1.5.2
Babel==2.8.0
Click==7.0
ecdsa==0.13.3
Flask==1.0.2
Flask-Cors==3.0.8
Flask-Migrate==2.7.0
Flask-Moment==0.9.0
Flask-RESTful==0.3.7
Flask-Script==2.0.6
Flask-SQLAlchemy==2.4.0
Flask-WTF==0.14.3
future==0.17.1
gunicorn==20.0.4
isort==4.3.18
itsdangerous==1.1.0
Jinja2==2.10.1
lazy-object-proxy==1.4.0
Mako==1.1.2
MarkupSafe==1.1.1
mccabe==0.6.1
psycopg2==2.8.5
psycopg2-binary==2.9.1
pycodestyle==2.6.0
pycryptodome==3.3.1
pylint==2.3.1
python-dateutil==2.6.0
python-editor==1.0.4
python-jose-cryptodome==1.3.2
pytz==2019.1
six==1.12.0
SQLAlchemy==1.3.3
typed-ast==1.4.2
Werkzeug==0.15.3
wrapt==1.11.1
WTForms==2.3.1
I have set python runtime version 3.7.9 but I tried with 3.8.12 as well but getting same error.