streamlit's webserver not working when using pdm for installation
See original GitHub issueSummary
When I’m using pdm to install streamlit, I cannot connect to streamlit’s webserver. From pdm’s web site: PDM is a modern Python package manager with PEP 582 support.
Steps to reproduce
- Install PDM:
pipx install pdm
- Create new directory and go there:
mkdir st_test; cd st_test
- Init pdm:
pdm init
(and use the defaults) - Install streamlit:
pdm add streamlit
- Use any minimal streamlit example and run streamlit:
pdm run streamlit run hello_world.py
Expected behavior:
Browser opens correct web page served by streamlit.
Actual behavior:
Browser tries to connect to localhost:3000
(which is also mentioned in the logs), but when I look at the logs, the server actually runs on port 8501. When I try this port, I get a 404, so I can connect to the server on this port, but something’s broken.
Is this a regression?
That is, did this use to work the way you expected in the past? never tried before
Debug info
- Streamlit version: 0.80.0
- Python version: 3.8.8
- Using pdm
- OS version: Linux 5.11.11
- Browser version: Chrome 89.0.4389.114 (Official Build) (64-bit)
Additional information
jupyter-lab show a similar issue with pdm, but it can be fixed by running pdm run jupyter-lab --core-mode
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top Results From Across the Web
pdm-installed streamlit fails to launch a server - Stack Overflow
The problem is that, while streamlit configs default to server port 8501 , the server is launched on the port 3000 .
Read more >App is not loading when running remotely - Streamlit Docs
If you see Streamlit running, the most likely culprit is the Streamlit port not being exposed. The fix depends on your exact setup....
Read more >Troubleshooting - Streamlit Docs
If your app is running slowly or you're hitting the 'Argh' page, we first highly recommend going through and implementing the suggestions in...
Read more >Network URL not working on other computers - Using Streamlit
When I try to access the web app from another computer using the provided network URL, Streamlit shows: Safari can't open the page...
Read more >Deployed Streamlit App not working despite no build errors
I work for a healthcare firm and currently package client dashboards as macro-based Excel files (with forms & a hidden application ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks like @AnOctopus is an enthusiast and is working towards this:
https://github.com/pdm-project/pdm/issues/972
I’ll re-open, so everyone can be aware that its been requested.
That workaround gives me a very good idea about the source of the problem. We automatically set development mode by trying to detect how streamlit was installed, and I suspect being installed into
__pypackages__
breaks our heuristics for that. Should be relatively easy to fix.