How to Convert a Streamlit App to an .EXE Executable

  Рет қаралды 38,224

Fanilo Andrianasolo

Fanilo Andrianasolo

Жыл бұрын

Yuichiro (a.k.a whitphx, also the creator of streamlit-webrtc) is a Streamlit Creator who singlehandedly implemented stlite, a port of Streamlit to WebAssembly powered by Pyodide/ This enables us to use Streamlit in a web page without installing Python locally.
With this + Electron, it is possible to build a Desktop Executable out of this Pyodide-powered project! This currently makes it the easiest way, literally 3 commands, to bundle a Streamlit project into an executable to send to your friends and family!
📧 My email list to keep up to date with the latest news, tutorials and resources about Streamlit & friends ➡ andfanilo-newsletter.streamli...
💰 Buy me a coffee to stay awake while editing ➡ www.buymeacoffee.com/andfanilo
🗣️ Find my socials ➡ andfanilo.com
👉 Links
- SUPPORT THE AUTHOR OF THE LIBRARY: ko-fi.com/whitphx or www.buymeacoffee.com/whitphx
- Yuichiro's Twitter: / whitphx
- Stlite Desktop Tutorial: github.com/whitphx/stlite/blo...
- Code: github.com/andfanilo/social-m...
- Video Breakdown of the trailer (unlisted): • Video Breakdown - Stli...
My tools (Affiliate links to support me!)
- 📷 Main Camera - amzn.to/3QvTosB
- 📷 Main Lens - amzn.to/3svYCwq
- 🎙️ Microphone - amzn.to/47l5ewA
- 🎵 Music & Sound Effects - www.epidemicsound.com/referra...
- 📕 Streamlit Official Book - amzn.to/3QuRPwl
______
🪶 Hello DataFans! This month has been brutal, and next is a meetup I need to record and edit, and then I'll be going to PyconFR in Bordeaux! May I meet you there?
👍 On this channel, we love building a lot of small yet smart Streamlit apps to improve our Python chops, and recall our stories around Data Science and Content Creation. Like & Subscribe if you would like to see more videos!
⚠️ Disclaimer: This video is not sponsored, I receive no compensation by any brand quoted in this video. Views are my own and do not represent my employer's.
Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. Thank you for supporting my channel so I can continue providing you with free content!
#streamlit #python #datascience #dataapps

Пікірлер: 151
@nopewtopieafterzippingafly4168
@nopewtopieafterzippingafly4168 Жыл бұрын
Hey y’all! One fix that made the altair issue work for me was -> running the following in the powershell visual studio code command (windows): ~> npm outdated And then ~> npm update Please note, there’s no need for the altair
@andfanilo
@andfanilo Жыл бұрын
Thanks for sharing, lemme pin your comment for some time :)
@nopewtopieafterzippingafly4168
@nopewtopieafterzippingafly4168 Жыл бұрын
​@@andfanilo !!!!!!!QUICK UPDATE!!!!!!! [[[How to create a Streamlit desktop app]]] Create the following package.json file to start a new NPM project. Edit the name field. { “name”: “xxx”, “version”: “0.1.0”, “main”: “./build/electron/main.js”, “scripts”: { “dump”: “dump-stlite-desktop-artifacts”, “serve”: “cross-env NODE_ENV=production electron .”, “pack”: “electron-builder --dir”, “dist”: “electron-builder”, “postinstall”: “electron-builder install-app-deps” }, “build”: { “files”: [“build/**/*”], “directories”: { “buildResources”: “assets” } }, --------------------------------------------------------------- “devDependencies”: { “@stlite/desktop”: “^0.25.0”, “cross-env”: “^7.0.3”, “electron”: “23.1.1”, “electron-builder”: “^23.6.0” } } Here you should change it to the following: ->->->->->->->->->->->->->->->->->->->->->-> }, “devDependencies”: { “@stlite/desktop”: “^0.31.0”, “cross-env”: “^7.0.3”, (check your version, by running npm show cross-env in the command) “electron”: “23.1.1”, (check your version - for me it was 23.1.1) “electron-builder”: “^24.4.0” (depending on the version) } } 2. Run npm update (instead of npm install). 3. Create streamlit_app directory. o Any directory name can be used here. 4. Create streamlit_app/streamlit_app.py. o Change the directory name if you used a different name in the previous step. 5. Write your Streamlit app code in streamlit_app/streamlit_app.py. o The file name streamlit_app.py is not configurable now. 6. Optionally, you can add more contents in the directory, including pages/*.py for multi-page apps, any data files, and so on. 7. Run npm run dump streamlit_app - -r requirements.txt (the requirements file includes like the following: streamlit plotly pandas 8. Run npm run serve (or similar to the video -servewindows) 9. Run npm run dist or yarn dist for packaging. o This command bundles the ./build directory created in the step above into application files (.app, .exe, .dmg etc.) in the ./dist directory. To customize the built app, e.g. setting the icon, follow the electron-builder instructions.
@TheMaxxit
@TheMaxxit 4 ай бұрын
I tried this but I still get the same error, how do I fix it?
@_fifty_shades_of_life_
@_fifty_shades_of_life_ 2 ай бұрын
Even I tried npm outdated and npm update, also altair
@luis-nt7fm
@luis-nt7fm 6 ай бұрын
Brother, I just discovered your channel on YT, I'm working on a streamlit project and you're helping me like you can't imagine, thank you so much.
@andfanilo
@andfanilo 6 ай бұрын
Thanks so much for the feedback, it's greatly appreciated 🙂 What type of app are you working on? I'd love to know!
@1littlecoder
@1littlecoder Жыл бұрын
Top notch content, I always wanted to make one on this topic. But this is quite amazingly done video!
@andfanilo
@andfanilo Жыл бұрын
Thanks! Well You can still do tthe desktop one to close up your trilogy of stlite videos 😁
@user-qe3fp1hv8n
@user-qe3fp1hv8n 2 ай бұрын
You look good, bro! This is the third video I’m seeing and couldn’t stop🤗
@andfanilo
@andfanilo 2 ай бұрын
Awesome! Thank you, keep binge-watching :D it helps a lot!
@csswork1475
@csswork1475 11 ай бұрын
Love your videos. You're a streamlit wizard, and a fun wizard on top of that. Keep up the good work.
@andfanilo
@andfanilo 11 ай бұрын
Thank you for watching, I'm very grateful :) ! Hope to keep seeing you around
@neno5794
@neno5794 Жыл бұрын
very insightful and fun to watch, enjoying your content, Fanilo!
@andfanilo
@andfanilo Жыл бұрын
Thank you for the support! Much appreciated, see you on the next one :D
@AhmetAnilDindar
@AhmetAnilDindar Жыл бұрын
I've created my very first stlite program. Highly appreciated because my graduate students will love it.
@andfanilo
@andfanilo Жыл бұрын
Awesome! I didn’t think much about distributing advanced analytics demos as Streamlit apps 🤔 let me know how it goes!
@gugaucb
@gugaucb 10 ай бұрын
I like your videos. Very funny, simple and easy to understand all things. Keep going.
@andfanilo
@andfanilo 10 ай бұрын
Glad you like them, will keep going :)
@Jay-je6en
@Jay-je6en Жыл бұрын
Tired this out my self a few weeks back and it really is a great step forward! Unfortunately, I couldn’t persist a local database due to Electron security restrictions. I also tried MongoDB and Firebase for cloud storage, but I believe the imports included C-extensions, preventing it from working. Great video by the way 👍🏼
@andfanilo
@andfanilo Жыл бұрын
Thanks for mentioning. I had seen an issue on this (github.com/whitphx/stlite/issues/463), I just forgot to script this and the general issues on interacting back with the local filesystem 🥲 . Hope other viewers will catch your comment. And that sucks for the external databases, we'll have to wait for the C-extension packages...I'm generally hopeful the Python with WASM ecosystem will keep growing with the efforts on PyScript, and this solution is still easier to setup than PyInstaller/PyOxidizer, so fingers crossed Have a nice day, thanks for watching!
@Jay-je6en
@Jay-je6en Жыл бұрын
Appreciate the reply 😊 It certainly would be great to see the WASM ecosystem continue to grow and am hopeful there will be a DB solution in the near future.
@smiley3239
@smiley3239 Ай бұрын
can i say i love you??? cause damn dude, your explanation is perfect!!!!
@andfanilo
@andfanilo Ай бұрын
Well thank you for the support I'm very grateful :) I hope you watch more then, I even just released a new video!
@aar021
@aar021 Жыл бұрын
Next level! Thank you good Sir.
@andfanilo
@andfanilo Жыл бұрын
Looking forward to your deployed app :)
@Sonntagssoziologe
@Sonntagssoziologe Ай бұрын
The finale was so exciting that I need to recover first. Don't you want to be a Marvel screenwriter?
@andfanilo
@andfanilo Ай бұрын
🙃 Maybe that was my dream job all along Have you watched my Epic Book Trailer ( kzbin.info/www/bejne/rqbFgmOiqM6JapY ) ? I feel this one was the most intense I produced 😆
@toto-yi2vd
@toto-yi2vd 11 ай бұрын
Nice video. Does this process work for a multipage streamlit app that uses several other packages like streamlit extras, streamlit drawable canvas, st_aggrid, tensorflow, some pre-trained deep learning based libraries/modules etc?
@andfanilo
@andfanilo 11 ай бұрын
Thanks for the support! It works until you use a Python package that does not have a Pyodide counterpart. I haven't tested Tensorflow but I don't think this one would work for example. It unfortunately then becomes a game of testing each package...if you're doing a really complex app with a lot of dependencies, maybe you're better off hosting it in the Cloud or on an on-premise server, until the Pyodide ecosystem gets bigger :/
@DrSIyer
@DrSIyer 9 ай бұрын
Great tutorial!! Thank you ! Will a streamlip app that web-scrapes live data from websites (using requests, beautifulSoup etc), still work when converted to a standalone executable?
@andfanilo
@andfanilo 9 ай бұрын
Thanks for the support! The list of Pyodide maintained packages can be found here pyodide.org/en/stable/usage/packages-in-pyodide.html which beautifulsoup is in, and to that you'll have to add all pure Python packages. I believe requests is pure python but I haven't tried, maybe you can try packaging a very small requests-beautifulsoup4 app to test it out If you do let us know :) I'd love to hear back, that looks like a very interesting use case!
@aleksandardimovski8589
@aleksandardimovski8589 9 ай бұрын
Hi and thanks for the useful implementation. Following your procedure, at the point where I run the command "npm run serve" I obtain an ENOENT error saying that a file is missing in the stlite-manifest.json. Any idea what could be the issue?
@andfanilo
@andfanilo 9 ай бұрын
Hello! Hmmm I never had that and I can't imagine where it comes from...I don't know if there was a new version of stlite that is missing such file, can you try writing your issue on the original repo: github.com/whitphx/stlite/issues ?
@enzobustosdasilva8060
@enzobustosdasilva8060 6 ай бұрын
Hello, I'm getting just a blank canvas when I use the servewindows
@arthurribeiro1452
@arthurribeiro1452 10 ай бұрын
I'm trying to create an app that saves few files on the user computer, but it seems that pyodide can't access user files or folders. Is there anyway I can use your method to save files in the downloads folder or any folder specified by the user??
@andfanilo
@andfanilo 10 ай бұрын
Hey! I know this issue is tracked somewhere, let me find it...ah, github.com/whitphx/stlite/issues/463 As you say, I don't think it's possible to interact with the user computer for now. Maybe saving in a remote Cloud resource is the only option for now 🥲 You can try bringing what you tried in this issue to ping it up Have a nice day!
@shamaldesilva9533
@shamaldesilva9533 Жыл бұрын
Nice more reasons to use streamlit 🥳🥳🔥
@andfanilo
@andfanilo Жыл бұрын
I guess! I have to check if I can run those in Github actions now!
@RKusprihanto
@RKusprihanto 9 ай бұрын
Thankyou, will try these later
@andfanilo
@andfanilo 9 ай бұрын
Let us know how it goes ;)
@RKusprihanto
@RKusprihanto 8 ай бұрын
Hi there, my progress so far is stuck to can't connect to http url because the ssl module is not available. Any suggestion?
@RKusprihanto
@RKusprihanto 8 ай бұрын
@@andfanilo ssl error resolved, pyodide_http do the trick.
@sachansiddharth
@sachansiddharth 10 ай бұрын
Hi Fanilo, This is really a brillant work. I'm facing a problem using the same method. My streamlit app downloads a csv or data file of the calculation I do but when I convert it into exe it doesn't download the file to disk. Can you help me in that.
@RaizenCorporation
@RaizenCorporation Жыл бұрын
Hey, great tuto ! Very funny. But i'm encountering something. While dumping my project who have github package (full python) the wheel can't be found because, the micropip is python 3.10. Is it possible to spécify a python ? Thanks and keep up your good work :)
@andfanilo
@andfanilo Жыл бұрын
Hey! From memory you're stuck on Python 3.10 for now, I read this somewhere on the stlite docs but can't find the link right now :/ I know Pyodide and Streamlit independently integrated Python 3.11 end of January. Maybe you can ask on github.com/whitphx/stlite/issues for a 3.11 version. Have a nice day!
@RaizenCorporation
@RaizenCorporation Жыл бұрын
@@andfanilo Thanks for the quick responce. Unfortunaly i didn't saw that 'socket' package is not supported. My app is mainly focused on this point haha. Have a nice day too :)
@ege.the.engineer
@ege.the.engineer 7 ай бұрын
Unfortunately this doesn't work if your code contains modules/packages that written other languages than python, and/or if it can't find .whl package of that module my issue was the first one. I have bunch of module that written in other languages such as c++ etc on my python-streamlit project. Any suggestion for this will be appreciated.
@andfanilo
@andfanilo 7 ай бұрын
Hello! Yes, Pyodide clearly won't be able to manage any of those non pure-python packages, as you may have seen in other comments :/ you may have more luck with Pyinstaller but I find packaging Streamlit with Pyinstaller to be extra painful.. Unfortunately, I don't think it will be easy to install multiple non-python binaries on non tech-saavy people's computers, and for now my preferred way of doing would be to Dockerize the app or install it yourself on a private server/in a VM in the cloud and provide an URL to your audience. If I find any other easy way I'll write it down in a community post Have a nice day!
@maxlgemeinderat9202
@maxlgemeinderat9202 5 ай бұрын
Great video! However it is not working for me (stlite-manifest.json is missing). Do you know if the steps are the same if large files are in the repo? I built an LLM chatbot (locally downloaded open-source model). Would be cool to see a wallthrough!
@andfanilo
@andfanilo 5 ай бұрын
Hey there! I don't know if there was a recent update that change the behavior of stlite-manifest.json or something, you could try asking on github.com/whitphx/stlite/issues I haven't tried to package a downloaded HF model in an .exe though, I don't know if that would be easy...I'll try a bit on my side later on, do tell us if you make progress, I'd love to know
@allendu95
@allendu95 5 ай бұрын
Same issue on my side with latest package.json file (@stlite/desktop :0.39.0) Update : It worked on my personnal laptop. I wonder if that's related to vpn restriction 🤔
@jtekmmx
@jtekmmx Жыл бұрын
Very well done
@andfanilo
@andfanilo Жыл бұрын
Thanks for watching, hope to see you around :)
@rajay5077
@rajay5077 Жыл бұрын
Thanks for excellent demo. I am getting error couldn't find python pure wheel for my library pypylon. Even though the .whl files are present in the PyPi. Any suggestions plz
@andfanilo
@andfanilo Жыл бұрын
Hey! That's odd :/ could you write down the list of commands you run and the full error on github.com/whitphx/stlite/issues ? That'll be easier to debug! Have a nice day
@marcussrm4260
@marcussrm4260 3 ай бұрын
Hello! If I change the main page file name from "streamlit_app.py" to something else, do I need to change anything in the .json files or something else?
@andfanilo
@andfanilo 3 ай бұрын
Unfortunately the streamlit_app.py name is not configureable github.com/whitphx/stlite/tree/main/packages/desktop I think it is hardcoded for now 😕
@marcussrm4260
@marcussrm4260 3 ай бұрын
@@andfanilo Hey, thank you very much for helping me with my questions! I'm a big fan of your work!
@zedcodinacademibychinvia9481
@zedcodinacademibychinvia9481 4 ай бұрын
sir am i have hosted my streamlit app using streamlit cloud. its running on desktop not on phonne
@boukhrislouay659
@boukhrislouay659 Жыл бұрын
Hello, i tried using the requests module after converting the streamlet app to an exe and it does not send the request to the API. is this an issue you faced? thank you
@andfanilo
@andfanilo Жыл бұрын
Haven't tried, I'll put this in my todo list and come back to you :/ Also check github.com/whitphx/stlite/issues maybe there is an issue around requests there Have a nice day!
@ant-one7345
@ant-one7345 9 ай бұрын
Hey, Thanks for the great contents! Any plans to make similar stuff with shiny for python?
@andfanilo
@andfanilo 9 ай бұрын
Hey! Thanks for the support, I'm grateful :) I've been playing around with Shiny for Python. I like it, I'm trying to establish whether I have time going deeper for full videos, if I stay very superficial with quick start videos (which is not really what I do on this channel but is possible if I want to talk about more frameworks) or if I share my insights in a future newsletter so I can go deep without spending too much time What do you think? Would you like a Shiny quick start or would you rather have deeper Shiny tutorials? Have a nice day!
@ant-one7345
@ant-one7345 9 ай бұрын
Hey @andfalino, I would prefer and watch Shiny quick start 😊 Have a great day!
@JefersonSilva-wt4el
@JefersonSilva-wt4el Жыл бұрын
I couldn't turn my app into an executable, could it be because of the libraries? I'm using geopandas and others.
@andfanilo
@andfanilo Жыл бұрын
It's possible :/ make sure your packages are in the list of possible pyodide packages by checking the following list: pyodide.org/en/stable/usage/packages-in-pyodide.html Hope it helps!
@pverprogramz641
@pverprogramz641 2 ай бұрын
I am making an exe that checks if python is installed in the computer and i am making the exe in python.. is it possible ?? if so how ?
@arthurpouzargue2612
@arthurpouzargue2612 Ай бұрын
I have troubles with libraries while running the app, is it possible to do this with docker ?
@andfanilo
@andfanilo Ай бұрын
Sure, I do think Docker is the better option if everyone has it. Check out docs.streamlit.io/deploy/tutorials/docker
@jorge1869
@jorge1869 Жыл бұрын
Is streamlit dead? I ask because the Streamlit team has not announced any further progress on this framework since December 2022, the project seems to have stopped. Greetings
@andfanilo
@andfanilo Жыл бұрын
I don't think so? Streamlit 1.17 (discuss.streamlit.io/t/version-1-17-0/36056) and 1.18 (discuss.streamlit.io/t/version-1-18-0/37501) were released in January and February of 2023. 1.18 is especially exciting because it has static serving, print as PDF, endpoints conflicting with GCP were renamed, and caching primitives are out of experimental (blog.streamlit.io/p/c0a90231-9848-47ec-a40c-ad4a344e4de1/) Nested columns are coming, + as Creators we had access to exciting beta features that are in the roadmap, which by the way was also updated so you can see there what is coming (roadmap.streamlit.app/) Multiple Github issues have been triaged 3 days ago to give an idea on which features will be prioritized/dropped down, so still a lot of activity. They are also preparing for Snowflake Summit in April, which will come with some more announcements I think (I'm not in the dev team, they don't tell me those kinds of secrets ^^). I didn't make a video about 1.18 yet, because I'm a little slow, but it'll be coming!
@denisblack9897
@denisblack9897 5 ай бұрын
Build stuff, stop exploring libraries
@smanzoli
@smanzoli 4 ай бұрын
@@denisblack9897stoooopidiest advice EVER.
@akshaya9577
@akshaya9577 Жыл бұрын
Hi Thanks for the great video. I unfortunately get a boot up error after running the "npm run servewindows". The windows opens and loads for a while and then gives the error that "No module called altair.vegalite.v4 found". I installed altair==4.0, but it still give me the error. Could you please help?
@andfanilo
@andfanilo Жыл бұрын
Hey! shoot, I think an earlier viewer commented the same issue if you scroll in the comments :/ I'm going to copy part of the answer here. There is a fix going on with github.com/streamlit/streamlit/pull/6618 which should enable Altair 5 to work with Streamit when merged in around 2 weeks I think... unfortunately Altair 5 is installed by default by stlite and conflicts with the current altair.vegalite.v4, and you can't downgrade it So I think you'll have to wait for 2 weeks, or ask the stlite developer to release a version with a downgraded version of altair (which I don't honestly think he will, but we never know). Sorry :/
@akshaya9577
@akshaya9577 Жыл бұрын
@@andfanilo ok. Thanks for the fast response :)
@sstaud1102
@sstaud1102 3 ай бұрын
Is it possible to use the .exe on a smartphone as well?
@coding_with_ash
@coding_with_ash Жыл бұрын
i am getting "module not found error" in the step "Error during boot up" can u plz help where to install i tried all combinations it gives error streamlit v17 already available so can't install v22 not sure how to debug... wasted 2 full days on this... :-( any help appreciated
@andfanilo
@andfanilo Жыл бұрын
Hey! I may have forgotten to mention in the video...you can't install a newer version of Streamlit in stlite (there's a pyodide issue preventing users to install a newer version of a package), so the version of stlite hardcodes the version of Streamlit. For now you may have to remove Streamlit for the list of requirements.txt. Yuichiro, author of stlite, would need to build a new stlite version for the new Streamlit v1.22 version, see this github.com/whitphx/stlite/issues/557 Hope it helps!
@rkailassh
@rkailassh Жыл бұрын
This is wonderful, i want to know will it work without the internet?
@andfanilo
@andfanilo Жыл бұрын
It should yeah as all the resources are embedded in the built stlite app. My computer at the end did not have Internet
@user-kp2pw8sk3v
@user-kp2pw8sk3v Жыл бұрын
i love u man. GJ!
@andfanilo
@andfanilo Жыл бұрын
Thanks for the support :D
@greciaguerrero218
@greciaguerrero218 Ай бұрын
Hey, Fanilo, great video!! It worked for me as long as the packages are supported by Pyodide. Unfortunately, in my case Pyodbc isn't :( I'm looking for another way to generate an exe Any ideas are very welcome :D
@andfanilo
@andfanilo Ай бұрын
Hey thanks for watching! Yeah unfortunately it's not easy to find which packages are not supported by Pyodide until you actually try it. There is a long post around PyInstaller that I've never been able to make work of ( discuss.streamlit.io/t/using-pyinstaller-or-similar-to-create-an-executable/902 ) and some Electron based tests here: github.com/streamlit/streamlit/issues/1370#issuecomment-1272624057 But alas it's a hard to topic to navigate...so no one fits all answer for now 😐
@charlottepetters283
@charlottepetters283 2 ай бұрын
I am facing a bunch of issues. Well, I succeeded having an executable. But problem 1: The exe cannot read files from paths given in the code which is crucial in my app (FileNotFoundError (44, 'No such file or directory')). Problem 2: In one of my pages I am using st_aggrid which raises a ModuleNotFoundError. Is this module not working with stlite? Problem 3: It is not even recognizing st.header correctly: TypeError: HeadingMixin.header() got an unexpected keyword argument 'divider'. Do you have any ideas on theses issues?
@andfanilo
@andfanilo Ай бұрын
Hey there! It's been a long time since I played with stlite, you will have more luck writing the issues on Yuichiro's stlite package 🤔 github.com/whitphx/stlite/issues though from memory 1/ I think it is actually not possible right now, or not implemented yet given github.com/whitphx/stlite/issues/541 2/ Strange, I think it should, I know it's being tested on the package github.com/whitphx/stlite/pull/874 3/ ok this one is strange and definitely warrants an issue :/ Sorry I couldn't be more helpful, but hopefully Yuichiro will be of better help!
@charlottepetters283
@charlottepetters283 Ай бұрын
@@andfanilo Hi Fanilo, thank you very much for your reply! Though it is not as positive as I hoped for... Probably I will leave the exe-idea behind me and go for another approach. Great videos by the way! Keep going 🙂
@andfanilo
@andfanilo Ай бұрын
@@charlottepetters283 I think this is for the best...if you really need the .exe, maybe Flet is a better choice, though I haven't tested their .exe implementation. Otherwise, deploying on an internal server, sharing the URL to colleagues and if need be manage user permissions is my usual advice, though I understand it's not always possible Thanks for the support 🙂 see you on the next video
@joseangelprieto3030
@joseangelprieto3030 Жыл бұрын
I love your video, but I need to play it in slow motion to grab everything!!
@andfanilo
@andfanilo Жыл бұрын
Yeah...you can read the README if needed: github.com/whitphx/stlite/blob/main/packages/desktop/README.md In my mind this was meant to be more of a quick overview than a fully fledged tutorial, I'll think about your comment for next time :) Have a nice day!
@saakshimalhotra3926
@saakshimalhotra3926 6 күн бұрын
I am facing an issue of " no module named matplotlib" , even tho I am using the version specified in pyodide, also I am unable to use folium because of the same reason. Help would be appreciated 😊
@andfanilo
@andfanilo 6 күн бұрын
Hey! It's been a while since I used stlite...I'm currently out of work schedule for a while, so your best bet for now would be to post your issue on github.com/whitphx/stlite/issues 🤔 Hopefully he can get your dependency versions solved!
@arjundev4908
@arjundev4908 9 ай бұрын
Hi, Great tutorial. I have a request. I built an app on streamlit and now my UI team has built an interface on React. Now how do I integrate my streamlit app into UI? like how to create API endpoints? Please make some video on this. It will be of great help _/\_ .
@andfanilo
@andfanilo 9 ай бұрын
Hey there! I'm not totally sure I understood your question, so sorry if I miss the mark. From what I understood I imagine two ways to integrate your Streamlit app into React. They revolve around the fact that Streamlit works over the Tornado Python webserver 1. stlite is Serverless Streamlit, it detaches Streamlit UI from Tornado, so for Streamlit code that doesn't use more complex Python packages, you can integrate Streamlit code in HTML directly in a new React route. It sounds easy, but there are quite some limitations if you're using packages like Pandas pyodide.org/en/stable/usage/packages-in-pyodide.html 2. Otherwise, you'll have to host your Streamlit + Tornado somewhere (Streamlit Cloud, HF Spaces, your own platform) and your app in a HTML page in your React app as a separate route or in an existing route (one example docs.streamlit.io/streamlit-community-cloud/share-your-app/embed-your-app if your app is on Streamlit Cloud). Note that your Streamlit and React app can't easily pass information, you won't be able to get Streamlit slider variable from your React app, Streamlit is fully embedded and independent Hope this helps a little; have a nice day, Fanilo
@muhammadarqam9421
@muhammadarqam9421 7 күн бұрын
I am getting script execution error: 'Attribute' object has no attribute 'id' when electron app is opened using npm run serveWindows
@andfanilo
@andfanilo 6 күн бұрын
Hey! It's been a while since I used stlite...I'm currently out of work schedule for a while, so your best bet for now would be to post your issue on github.com/whitphx/stlite/issues 🤔 That "Attribute" thing is strange, not sure it would be your fault so I hope the author of the package will find a better explanation for the problem!
@iammcqwory
@iammcqwory Жыл бұрын
asante sana
@marcussrm4260
@marcussrm4260 3 ай бұрын
I'm trying to create a streamlit application that reads files from a folder on the local machine, but from within npm the application cannot find the path to the external folder, returning error 44. Can anyone help me?
@andfanilo
@andfanilo 3 ай бұрын
Hey! I just checked and if you want to read a file from the built app, I don't think that's possible for now given this new issue: github.com/whitphx/stlite/issues/789 If you have some boilerplate code, maybe you could add a new issue on the repo and link back to this issue? But if it's including files during the build phase it should work only for files inside the streamlit_app folder, not other external locations, though I haven't tested :/ github.com/whitphx/stlite/tree/main/packages/desktop
@marcussrm4260
@marcussrm4260 3 ай бұрын
@@andfanilo Hey, thank you very much for helping me with my questions! I'm a big fan of your work!
@fluffykitties9020
@fluffykitties9020 4 ай бұрын
Streamlit needs to work harder to simplify this. what a nightmare.
@andfanilo
@andfanilo 4 ай бұрын
Well, yeah it would be cool if someone took the matter in its hands. Though converting a web app to a desktop app is a nightmare on its own and I doubt someone wants to invest more time in it, seeing how much Yuichiro has already poured into stlite/Pyodide. I think Solara and Panel are researching alternative solutions for packaging web into desktop. We'll have to see if someone comes with a creative solution that can be passed to all the web frameworks Until then, we'll have to suffer in silence 😥
@paulemmanuelkouassi2587
@paulemmanuelkouassi2587 8 ай бұрын
Need network to use app ?
@tirumaleshn8504
@tirumaleshn8504 Жыл бұрын
Nice work dude. This is the content I was searching for. But, can you please add the code of package.json for macos. Also, the altair issue is still repeating even though I've upgraded my streamlit version to latest one. Thanks in advance
@andfanilo
@andfanilo Жыл бұрын
Hey! > macos I don't have a Mac here so can't test, I think I do talk about completing the "build" level of package.json, and add the mac configuration from www.electron.build/configuration/mac. I can't test that right now, but hope it gets you kickstarted > Altair Still not resolved by the latest stlite/streamlit release, see the pinned comment for one resolution example, or wait for yet another Streamlit release :/
@SanjaySharma-rl3xu
@SanjaySharma-rl3xu 9 ай бұрын
Fanilo, can you make a video on using Django and streamlit?
@andfanilo
@andfanilo 9 ай бұрын
Hello! What would you mean, something like embedding a Streamlit app in a Django page with an IFrame? What usecase are you thinking about :) ? Have a nice day!
@SanjaySharma-rl3xu
@SanjaySharma-rl3xu 9 ай бұрын
@@andfanilo I was thinking more in terms of beautification of streamlit application using other web frames.
@philtoa334
@philtoa334 Жыл бұрын
Nice.
@andfanilo
@andfanilo Жыл бұрын
Thanks for the support :)
@auroragb
@auroragb Жыл бұрын
Great video, but i still prefer pyinstaller instructions in the streamlit forums
@andfanilo
@andfanilo Жыл бұрын
Well...As long as you get a solution to your problem 🙂
@user-linjiang
@user-linjiang 11 ай бұрын
ImportError: Can't connect to HTTPS URL because the SSL module is not available.😭😭😭
@muhammedali-sc
@muhammedali-sc 18 күн бұрын
You solved this problem?
@amargaikwad
@amargaikwad 16 күн бұрын
Could you please make a slow speaking and step by step detailed description guide video for noobs like me.
@amargaikwad
@amargaikwad 16 күн бұрын
How to install stlite, npm everything is confusing. 😢
@andfanilo
@andfanilo 6 күн бұрын
Hello! Damn this video is a bit old already, I'll probably do a slower version in the future behind a paywall to keep it updated The most detailed tutorial you'll have for this is github.com/whitphx/stlite/tree/main/packages/desktop in the meantime (npm is installed at the same time as you install nodejs)
@abdulrahmansabri4547
@abdulrahmansabri4547 11 ай бұрын
great video as always sir. I tried your method but I get an error in the step " npm run dump streamlit_app ". The error is : ModuleNotFoundError: The module 'micropip' is included in the Pyodide distribution, but it is not installed. Could you help me with this error please
@mikhwan97
@mikhwan97 3 ай бұрын
I also experience this issue. Anyone able to solved this?
@edustemlab
@edustemlab 2 ай бұрын
Use the requirements.txt method
@S-Lomar
@S-Lomar 9 ай бұрын
😍😍💕💕💕💕🥰🥰💕💕
@andfanilo
@andfanilo 9 ай бұрын
Glad you liked it :D
@satyabansahoo1862
@satyabansahoo1862 Жыл бұрын
Didn't work for me. It got stuck in Install [3 .whl files ] while trying "npm run dump streamlit_app -- -r requirements.txt"
@andfanilo
@andfanilo Жыл бұрын
Ah shoot 😯 for better support you could open an issue on github.com/whitphx/stlite/issues with your environment and dependencies you're trying to have added. The dump is mostly copying files to tmp directories and downloading Pyodide versions of dependencies from the web, so one of those 2 may be stuck...
@maciekolech7627
@maciekolech7627 Жыл бұрын
I got some problems, when I use "npm serverwindows" app runs correctly but my download buttons don't work. I tried to build an app anyway. When I run exe I get this error: ModuleNotFoundError: No module named 'altair.vegalite.v4'
@andfanilo
@andfanilo Жыл бұрын
Hey! shoot, I think an earlier viewer commented the same issue if you scroll in the comments :/ I'm going to copy part of the answer here. There is a fix going on with github.com/streamlit/streamlit/pull/6618 which should enable Altair 5 to work with Streamit when merged in around 2 weeks I think... unfortunately Altair 5 is installed by default by stlite and conflicts with the current altair.vegalite.v4, and you can't downgrade it So I think you'll have to wait for 2 weeks, or ask the stlite developer to release a version with a downgraded version of altair (which I don't honestly think he will, but we never know). Sorry :/ EDIT: Or check the pinned comment for a quick workaround
@maciekolech7627
@maciekolech7627 Жыл бұрын
@@andfanilo Thanks for help :)
@manojkumarsingh1890
@manojkumarsingh1890 Жыл бұрын
Hey I am getting the below ERROR raceback (most recent call last): File "/lib/python3.10/asyncio/futures.py", line 201, in result raise self._exception File "/lib/python3.10/asyncio/tasks.py", line 232, in __step result = coro.send(None) File "/lib/python3.10/_pyodide/_base.py", line 532, in eval_code_async await CodeRunner( File "/lib/python3.10/_pyodide/_base.py", line 355, in run_async coroutine = eval(self.code, globals, locals) File "", line 2, in File "/lib/python3.10/site-packages/streamlit/__init__.py", line 55, in from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator File "/lib/python3.10/site-packages/streamlit/delta_generator.py", line 45, in from streamlit.elements.arrow_altair import ArrowAltairMixin File "/lib/python3.10/site-packages/streamlit/elements/arrow_altair.py", line 36, in from altair.vegalite.v4.api import Chart M
@andfanilo
@andfanilo Жыл бұрын
Hey! shoot, I think an earlier viewer commented the same issue if you scroll in the comments :/ I'm going to copy part of the answer here. There is a fix going on with github.com/streamlit/streamlit/pull/6618 which should enable Altair 5 to work with Streamit when merged in around 2 weeks I think... unfortunately Altair 5 is installed by default by stlite and conflicts with the current altair.vegalite.v4, and you can't downgrade it So I think you'll have to wait for 2 weeks, or ask the stlite developer to release a version with a downgraded version of altair (which I don't honestly think he will, but we never know). Sorry :/
@manojkumarsingh1890
@manojkumarsingh1890 Жыл бұрын
@@andfanilo Thanks for response
@gekacrazy
@gekacrazy Жыл бұрын
😭😭😭electron: Failed to load URL: localhost:3000/ with error: ERR_CONNECTION_REFUSED
@andfanilo
@andfanilo Жыл бұрын
Oh that's odd...do you have more logs before this line? I would suggest putting the full logs and eventual smaller reproducible project on github.com/whitphx/stlite/issues, easier to debug than in KZbin comments :/
@ErenBoi-gz3jz
@ErenBoi-gz3jz 4 ай бұрын
hello @gekacrazy, did you find any solution because I am also facing the same issue. Thank you in advance.
@nicolo1140
@nicolo1140 3 ай бұрын
Same here 😭. Did you find any solutions?
@shubhamkotkar6158
@shubhamkotkar6158 Жыл бұрын
readSitePackagesSnapshot': [Error: ENOENT: no such file or directory, open 'C:\Users\shubh\wall\build\site-packages-snapshot.tar.gz'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\\Users\\shubh\\wall\\build\\site-packages-snapshot.tar.gz'
@andfanilo
@andfanilo Жыл бұрын
Which command gives the error?
5 Things I Wish I Knew Before Learning Streamlit
21:34
Fanilo Andrianasolo
Рет қаралды 21 М.
Streamlit Elements You Should Know About in 2023
14:31
Mısra Turp
Рет қаралды 87 М.
Универ. 10 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:04:59
Комедии 2023
Рет қаралды 2,4 МЛН
터키아이스크림🇹🇷🍦Turkish ice cream #funny #shorts
00:26
Byungari 병아리언니
Рет қаралды 24 МЛН
Convert GUI App to Real Program -  Python to exe to setup wizard
23:27
Python Simplified
Рет қаралды 485 М.
Deploy Your Streamlit App To Render (Free Heroku Alternative)
9:51
Coding Is Fun
Рет қаралды 58 М.
Do NOT use Streamlit for PRODUCTION until you watch this!
6:33
Full Stack AI
Рет қаралды 2,6 М.
EPIC Google Sheets to Interactive Dashboard in Python ft. Streamlit / CSS
27:41
An Unfiltered Deep Dive into Streamlit's Limitations
13:37
Fanilo Andrianasolo
Рет қаралды 10 М.
Convert Tkinter Python App to Executable (.Exe) File [pyinstaller]
9:11
Code First with Hala
Рет қаралды 130 М.
Deploy Your AI Streamlit App for FREE | Step-by-Step (Heroku Alternative)
30:10
Alejandro AO - Software & Ai
Рет қаралды 14 М.
My Workflow for Building any Streamlit Dashboard Project
9:40
Fanilo Andrianasolo
Рет қаралды 69 М.
The Unreasonable Effectiveness Of Plain Text
14:37
No Boilerplate
Рет қаралды 588 М.
Malware development 101: Creating your first ever MALWARE
28:00
Leet Cipher
Рет қаралды 254 М.
Универ. 10 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:04:59
Комедии 2023
Рет қаралды 2,4 МЛН