I have tried to deploy a streamlit app on Streamlit Community Cloud. I followed the instructions given here. But as I write code in GitHub Codespace, the new written codes are not saved to the git repository, even after save it. Also, when I open my streamlit app link from my Streamlit Community Cloud, I found it opens a welcome page instead of my streamlit app.
Hi! From the color highlighting, it looks like you did not commit and push your changes from your codespace to your Git repository. This article might be of use Using source control in your codespace - GitHub Docs .
If that doesnβt work, we can jump on a call and go through the process together. Maybe we can find ways to improve editing in codespaces
I tried to commit the changes by click the Source Control view and then click Commit .
But after an hours it shows Codespace Stopped
Could you enter a commit message in the top left and then press the commit button? The commit is still not complete
When I open my application URL, it shows this message
[ UTC ] Logs for stock-trend-6fkgvep7emn.streamlit.app/
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[13:53:48] π Starting up repository: 'stock-trend', branch: 'main', main module: 'Hello.py'
[13:53:48] π Cloning repository...
[13:53:49] π Cloning into '/mount/src/stock-trend'...
Warning: Permanently added the ED25519 host key for IP address '140.82.116.4' to the list of known hosts.
[13:53:49] π Cloned repository!
[13:53:49] π Pulling code changes from Github...
[13:53:50] π¦ Processing dependencies...
ββββββββββββββββββββββββββββββββββββββββ pip βββββββββββββββββββββββββββββββββββββββββββ
Using standard pip install.
Collecting argon2-cffi==23.1.0 (from -r /mount/src/stock-trend/requirements.txt (line 1))
Downloading argon2_cffi-23.1.0-py3-none-any.whl.metadata (5.2 kB)
Collecting ipython==8.23.0 (from -r /mount/src/stock-trend/requirements.txt (line 2))
Downloading ipython-8.23.0-py3-none-any.whl.metadata (4.9 kB)
Collecting keras==3.1.1 (from -r /mount/src/stock-trend/requirements.txt (line 3))
Downloading keras-3.1.1-py3-none-any.whl.metadata (5.6 kB)
Collecting matplotlib==3.8.3 (from -r /mount/src/stock-trend/requirements.txt (line 4))
Downloading matplotlib-3.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.8 kB)
Collecting neuralprophet==0.8.0 (from -r /mount/src/stock-trend/requirements.txt (line 5))
Downloading neuralprophet-0.8.0-py3-none-any.whl.metadata (9.1 kB)
Collecting numpy==1.26.4 (from -r /mount/src/stock-trend/requirements.txt (line 6))
Downloading numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
ββββββββββββββββββββββββββββββββββββββββ 61.0/61.0 kB 5.9 MB/s eta 0:00:00[2024-04-16 13:53:52.001661]
Collecting pandas==2.2.1 (from -r /mount/src/stock-trend/requirements.txt (line 7))
Downloading pandas-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (19 kB)
Collecting password-strength==0.0.3.post2 (from -r /mount/src/stock-trend/requirements.txt (line 8))
Downloading password_strength-0.0.3.post2-py2.py3-none-any.whl.metadata (10 kB)
Collecting requests==2.31.0 (from -r /mount/src/stock-trend/requirements.txt (line 9))
Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting scikit-learn==1.4.1.post1 (from -r /mount/src/stock-trend/requirements.txt (line 10))
Downloading scikit_learn-1.4.1.post1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)
Collecting scipy==1.13.0 (from -r /mount/src/stock-trend/requirements.txt (line 11))
Downloading scipy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (60 kB)
βββββββββββββββββββββββββββββββββββββββ 60.6/60.6 kB 264.1 MB/s eta 0:00:00[2024-04-16 13:53:52.499509]
Collecting psycopg2==2.9.9 (from -r /mount/src/stock-trend/requirements.txt (line 12))
Downloading psycopg2-2.9.9.tar.gz (384 kB)
ββββββββββββββββββββββββββββββββββββββ 384.9/384.9 kB 37.2 MB/s eta 0:00:00[2024-04-16 13:53:52.587100]
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
Γ python setup.py egg_info did not run successfully.
β exit code: 1
β°β> [23 lines of output]
running egg_info
creating /tmp/pip-pip-egg-info-m7mi7u82/psycopg2.egg-info
writing /tmp/pip-pip-egg-info-m7mi7u82/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-m7mi7u82/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-m7mi7u82/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-m7mi7u82/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Γ Encountered error while generating package metadata.
β°β> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Checking if Streamlit is installed
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[13:53:54] βοΈ installer returned a non-zero exit code
[13:53:54] βοΈ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[13:55:28] βοΈ Streamlit server consistently failed status checks
[13:55:28] βοΈ Please fix the errors, push an update to the git repo, or reboot the app.
main
sanniddha/stock-trend/main/Hello.py
Hey @Sanniddha ! This appears to be an issue with one of your dependencies. Can you share access to your source code? If not, can you create a smaller application that reproduces the issue?
Thank you! Weβll look into it and see if this is an issue on our side.
Hi @Sanniddha, this is a know issue with psycopg2
. You have two options:
- Install
psycopg2-binary
instead ofpsycopg2
- simple, fast and recommended - which is a binary distribution - Install the libraries and sources required by
psycopg2
- a bit harder - you can do so using APT
More on the topic: Installation β Psycopg 2.9.9 documentation