3
votes

I'm trying to run the command heroku local when following the section Push Local Changes in the tutorial: Heroku Python Tutorial

I'm getting the error:

[OKAY] Loaded ENV .env File as KEY=VALUE Format 18:51:47 web.1 | 'gunicorn' is not recognized as an internal or external command, 18:51:47 web.1 | operable program or batch file. [DONE] Killing all processes with signal SIGINT 18:51:47 web.1 Exited with exit code null

I tried searching online but I haven't found anything useful. Does someone have an idea how to solve this error?

EDIT: I have successfully implemented all the previous steps of the tutorial, and if I run CMD in the folder C:\python-getting-started and run the command pip list, the dependencies are:

Package         Version
--------------- ---------
asgiref         3.2.10
certifi         2020.6.20
chardet         3.0.4
dj-database-url 0.5.0
Django          3.0.8
django-heroku   0.3.1
gunicorn        20.0.4
idna            2.10
pip             20.2
psycopg2        2.8.5
pytz            2020.1
requests        2.24.0
setuptools      41.2.0
sqlparse        0.3.1
urllib3         1.25.10
whitenoise      5.1.0

Thanks

1
What does "if I show the dependencies" mean? What are you doing to see that list of packages?Chris
@Chris thanks, please see edit.Yafim Simanovsky
Do you have a file named requirements.txt and if so what is its content?Tin Nguyen
Yes I have the file with contents: django gunicorn django-heroku requests. I also ran the command previously according to the tutorial pip install -r requirements.txt. Please see postYafim Simanovsky

1 Answers

4
votes

Looking at the former step Run app locally, We can see the following information:

If you’re on Microsoft Windows system, run this:

heroku local web -f Procfile.windows
...
Just like Heroku, heroku local examines the Procfile to determine what to run.

Meaning, Windows requires the -f Procfile.windows flag.
Please try running heroku local -f Procfile.windows.