Heroku does not install anything listed in requirements.txt

I am not a native English user and I am a Python beginner. Sorry for grammar mistakes.

I am having trouble pushing a simple flask project on Heroku.

The project is on Github

First, my requirements .txt file looks like this:

click==6.7
Flask==0.12.2
gunicorn==19.7.1
itsdangerous==0.24
Jinja2==2.9.6
MarkupSafe==1.0
Werkzeug==0.12.2

      

However Heroku is returning an error code

remote:
remote: -----> Python app detected
remote: -----> Installing python-3.6.1
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote:        Failed to import the site module
remote:        Traceback (most recent call last):
remote:          File "/tmp/build_b20ee4f76cefa5dfa20998cf2e3692c7/site.py", line 1, in <module>
remote:            from flask import Flask, render_template
remote:        ModuleNotFoundError: No module named 'flask'
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed

      

I successfully run the project in venv and global environment and run the command multiple times ./venv/bin/pip freeze

in both activation mode and activation mode. ./venv/bin/pip -r install requirements.txt

the new vein may work fine.

I'm not sure which step I did wrong. Any advice would help.

Thank.

+3


source to share





All Articles