0

I'm new python flask developer. I want to deloy my application to heroku app. But it got ther Error: "ModuleNotFoundError: No module named 'flask_wtf'".

There is packages and installation

requirements.txt

beautifulsoup4==4.8.0

certifi==2019.6.16
Click==7.0
comtypes==1.1.7
Flask==1.1.1
Flask-WTF==0.14.2
gunicorn==19.9.0
html5lib==1.0.1
itsdangerous==1.1.0
Jinja2==2.10.1
lxml==4.4.1
MarkupSafe==1.1.1
pipenv==2018.11.26
python-dotenv==0.10.3
pywin32==224
selenium==3.141.0
six==1.12.0
soupsieve==1.9.3
urllib3==1.25.3
virtualenv==16.7.5
virtualenv-clone==0.5.3
webencodings==0.5.1
Werkzeug==0.15.5
WTForms==2.2.1
xlwings==0.15.8

Is there any way to install the module flask_wtf' on heroku app? I got the error when put the requirment.txt to heroku server.

  • Based on this : https://stackoverflow.com/a/51992855/8375783 you may have multiple python versions installed and one of them has the dependencies and you are running the other one. – Trapli Sep 04 '19 at 10:17
  • Do you also have a `Pipfile`? – ChrisGPT was on strike Sep 04 '19 at 11:58
  • I referred to this instructions and added the Pipfile follow: this:https://hackersandslackers.com/starting-a-python-web-app-with-heroku/ There was an trouble with python version when I try to deploy vitural python version in my desktop to heroku server which my not support flask_wtf. – Nguyen Duc My Sep 09 '19 at 02:59

1 Answers1

0

I referred to this instructions and added the Pipfile follow: this:https://hackersandslackers.com/starting-a-python-web-app-with-heroku/. However,there was an trouble with python version when I try to deploy vitural python version in my desktop to heroku server which my not support flask_wtf.

BTW, to resolve this, I only add the Profile and requiments.txt file in my project .Then heroku will only add specific modules with python version of its server.

This is my struct folder: static

-templates

-app.py

-requirements.txt

Click==7.0
Flask==1.1.1
Flask-WTF==0.14.2
gunicorn==19.9.0
itsdangerous==1.1.0
Jinja2==2.10.1
MarkupSafe==1.1.1
Werkzeug==0.15.5
WTForms==2.2.1

-Procfile

web: gunicorn app:app