Deploy app from Github - not recognizing packages

Dear all!

I am trying to deploy my app from Github.
I used several packages in my app Python code such as: sklearn, matplotlib, etc.

Although I created a packages.txt, it seems to not work.
Here is the txt script:
Capture

What am I doing wrong?

Thank you very much for the help!

Hi @theAguy, welcome to the Streamlit community!

From the picture you’ve posted, it appears that your file has no spaces between the package and the version numbers, is that correct? If so, you should be using an = sign or similar operator to declare what package versions you need, based on the Python conventions outlined here:

https://pip.pypa.io/en/stable/user_guide/#requirements-files

Best,
Randy

@randyzwitch thanks for the quick answer!

I have tried eve combination possible: with one = sign, with two == sign, with the string ‘-dev’ and without (and all together).
Nothing seems to work.

Any other suggestions?

For me the == works! I guess that giving an explicit version number fo each module is maybe the problem or the python version. I also have a ‘runtime.txt’ file that contains the python version :
python-3.8.6

@ksxx Thanks!
Can you share your Repo so I will be able to compare it with mine?

I push it directly to heroku and not via github so that I cant share the repo, but the package issue should not be related to that and otherwise there is nothing else special in my streamlit app. Basically I followed this tutorial :
How to Deploy Your Streamlit Apps to Heroku – JCharisTech
and added the runtime.txt file to the mix

Thank you @ksxx
I’ve tried to deploy it with Heroku however I did not manage to do it either.

But, I solved the problem -
Instead of using “freeze” to get the reqirements.txt I used
pip install pipreqs pipreqs /home/project/location

And it worked!
Thank you all for your help.