Problem with Heroku on windows/ requirement pywin32==227

Hello Streamlit community,

I tried to deploy an app (slidebar example in the Stralit documentaion) on Heroku/Windows, and was unable to do it. Below are the details of how I did, and the message error I got:

1- I followed the indications given here : https://devcenter.heroku.com/articles/getting-started-with-python#define-a-procfile
2- I modified a little bit the Pocfile.windows; my Pocfile.windows contains this line:
web: python manage.py && streamlit run slidebar.py
3- in the Streamlt environment created with Anaconda, pip freeze > requirements.txt
4- then, in my repository :

Everything seems OK after the following steps:

  • push the commited repository onto GitHub
  • create Heroku myapp
    But the the last step
  • push heroku master
    after giving a lot of OK lines, gives this:

ERROR: Could not find a version that satisfies the requirement pywin32==227

So the push is rejected.

My versions:

  • windows 10
  • conda 4.5.8
  • python 3.6
  • streamlit : the latest version (I upgraded today)

Would anyone help, please ?

Thanks in advance

Hey @AZlearn,

Since you pinned the versions on Windows, it also pinned pywin32 which is a Windows-specific package and won’t be available on an Unix VM on Heroku, hence the Could not find a version that satisfies the requirement pywin32==227.

You can comment/remove it in the requirements.txt you generated and push back into master :slight_smile:

Hi Fanilo,
Thanks for your quick answer.

1- First try
When removing the line pywin32==227 from requirements.txt.
the push doesn’t give any error.
But when opening the app, it can’t open and gives an error: “An error occurred in the application and your page could not be served.”

The command heroku logs --tail gives this:

Build failed – check your build output: https://dashboard.heroku.com/apps/45e86b9a-b579-4cb5-9a06-03992e00c026/activity/builds/a22c280a-5469-40d4-8b86-5b457e201b68

The line pywin32 was at line 58 in the original requirements.txt file
There was also pywinpty==0.5.7

2- Seecond try
I equally removed line pywinpty==0.5.7
Nevertheless, I obtained the same behavior: everything seems to work fine, but the app doesn’t show up and gives an error message:

Successfully installed Jinja2-2.11.2 MarkupSafe-1.1.1 Pillow-7.1.1 Pygments-2.6.1 Send2Trash-1.5.0 altair-4.1.0 astor-0.8.1 attrs-19.3.0 backcall-0.1.0 base58-2.0.0 bleach-3.1.4 blinker-1.4 boto3-1.12.42 botocore-1.15.42 cachetools-4.1.0 certifi-2020.4.5.1 chardet-3.0.4 click-7.1.1 colorama-0.4.3 cycler-0.10.0 decorator-4.4.2 defusedxml-0.6.0 docutils-0.15.2 entrypoints-0.3 enum-compat-0.0.3 future-0.18.2 idna-2.9 importlib-metadata-1.6.0 ipykernel-5.2.1 ipython-7.13.0 ipython-genutils-0.2.0 ipywidgets-7.5.1 jedi-0.17.0 jmespath-0.9.5 jsonschema-3.2.0 jupyter-client-6.1.3 jupyter-core-4.6.3 kiwisolver-1.2.0 matplotlib-3.2.1 mistune-0.8.4 nbconvert-5.6.1 nbformat-5.0.6 notebook-6.0.3 numpy-1.18.3 packaging-20.3 pandas-1.0.3 pandocfilters-1.4.2 parso-0.7.0 pathtools-0.1.2 pexpect-4.8.0 pickleshare-0.7.5 prometheus-client-0.7.1 prompt-toolkit-3.0.5 protobuf-3.11.3 ptyprocess-0.6.0 pydeck-0.3.1 pyparsing-2.4.7 pyrsistent-0.16.0 python-dateutil-2.8.1 pytz-2019.3 pyzmq-19.0.0 requests-2.23.0 s3transfer-0.3.3 six-1.14.0 streamlit-0.58.0 terminado-0.8.3 testpath-0.4.4 toml-0.10.0 toolz-0.10.0 tornado-5.1.1 traitlets-4.3.3 tzlocal-2.0.0 urllib3-1.25.9 validators-0.14.3 watchdog-0.10.2 wcwidth-0.1.9 webencodings-0.5.1 widgetsnbextension-3.5.1 wincertstore-0.2 zipp-3.1.0
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote:
remote: -----> Compressing…
remote: Done: 139.6M
remote: -----> Launching…
remote: Released v6
remote: https://slidebar-vbtapp-m.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy… done.
To https://git.heroku.com/slidebar-vbtapp-m.git
a827d30…cb5792d master -> master
==> seems to be OK

==> But the app gives an error.
But in this 2nd try, heroku logs --tail gives error code=H14 (different from previously):

Build succeeded
2020-05-03T15:22:05.058313+00:00 heroku[router]: at=error code=H14 desc=“No web processes running” method=GET path="/" host=slidebar-vbtapp-m.herokuapp.com request_id=4823cdbe-5097-4028-abbc-8228d7aa3570 fwd=“89.159.19.111” dyno= connect= service= status=503 bytes= protocol=https

My requirements.txt file is here : https://github.com/AZLearn/stlit-slider-heroku-test-m
Would you please have a look at it and tell me how to fix it ?

Thanks in advance

HI, I am also facing the same issue. Could you pleasse tell me do you find any method to solve the issue?

I’m not sure why you have Django there.

This might be down to having to specify the port to run on. There’s a working example here, check the procfile:

Hi Ian_Calvert, @ Vidush5
My problem was reformulated here: Problem with deployement on Heroku with WINDOWS

I have no more issues with pywin32 in the requirements.txt file (simply removed it).

Please re-read the post cited above, where my problem (still unsolved) is fully described. It is essentially a WINDOWS DEPLOYMENT issue, and specifically concerning the Pocfile.windows file, I guess.

Tons of indications have been given on this forum for Heroku/Linux, but I haven’t seen anything for Windows.

Thank you for your reply.

Any help for Heroku/Windows from anyone on the forum is appreciated.

Thanks