How to Convert a Streamlit App to an .EXE Executable

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ • 172

  • @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  Рік тому +1

      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 9 місяців тому +1

      I tried this but I still get the same error, how do I fix it?

    • @_fifty_shades_of_life_
      @_fifty_shades_of_life_ 6 місяців тому

      Even I tried npm outdated and npm update, also altair

  • @luis-nt7fm
    @luis-nt7fm 11 місяців тому +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  11 місяців тому

      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 Рік тому +12

    Top notch content, I always wanted to make one on this topic. But this is quite amazingly done video!

    • @andfanilo
      @andfanilo  Рік тому +4

      Thanks! Well You can still do tthe desktop one to close up your trilogy of stlite videos 😁

  • @BustosEnzo
    @BustosEnzo 11 місяців тому +4

    Hello, I'm getting just a blank canvas when I use the servewindows

  • @AhmetAnilDindar
    @AhmetAnilDindar Рік тому +1

    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!

  • @Jay-je6en
    @Jay-je6en Рік тому +4

    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  Рік тому +3

      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.

  • @csswork1475
    @csswork1475 Рік тому +2

    Love your videos. You're a streamlit wizard, and a fun wizard on top of that. Keep up the good work.

    • @andfanilo
      @andfanilo  Рік тому

      Thank you for watching, I'm very grateful :) !
      Hope to keep seeing you around

  • @fluffykitties9020
    @fluffykitties9020 9 місяців тому +1

    Streamlit needs to work harder to simplify this. what a nightmare.

    • @andfanilo
      @andfanilo  9 місяців тому +1

      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 😥

  • @robel_asefa
    @robel_asefa 7 місяців тому

    You look good, bro! This is the third video I’m seeing and couldn’t stop🤗

    • @andfanilo
      @andfanilo  7 місяців тому

      Awesome! Thank you, keep binge-watching :D it helps a lot!

  • @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

  • @smiley3239
    @smiley3239 6 місяців тому

    can i say i love you??? cause damn dude, your explanation is perfect!!!!

    • @andfanilo
      @andfanilo  6 місяців тому

      Well thank you for the support I'm very grateful :) I hope you watch more then, I even just released a new video!

  • @ege.the.engineer
    @ege.the.engineer Рік тому +1

    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  Рік тому +1

      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!

  • @devpgm2020pgm
    @devpgm2020pgm 3 місяці тому

    Hello, When executing the command 'run npm servewindows, the error is returned: "ModuleNotFoundError: No module named 'ssl'". Does anyone know the solution?

  • @Sonntagssoziologe
    @Sonntagssoziologe 6 місяців тому

    The finale was so exciting that I need to recover first. Don't you want to be a Marvel screenwriter?

    • @andfanilo
      @andfanilo  6 місяців тому +1

      🙃 Maybe that was my dream job all along
      Have you watched my Epic Book Trailer ( ua-cam.com/video/xubQ0lsiV44/v-deo.html ) ? I feel this one was the most intense I produced 😆

  • @gugaucb
    @gugaucb Рік тому

    I like your videos. Very funny, simple and easy to understand all things. Keep going.

    • @andfanilo
      @andfanilo  Рік тому

      Glad you like them, will keep going :)

  • @zedcodinacademibychinvia9481
    @zedcodinacademibychinvia9481 9 місяців тому

    sir am i have hosted my streamlit app using streamlit cloud. its running on desktop not on phonne

  • @aleksandardimovski8589
    @aleksandardimovski8589 Рік тому +1

    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  Рік тому

      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 ?

  • @Kuldip_07_
    @Kuldip_07_ 4 місяці тому

    Sir pyodide suport tensorflow?

  • @andreasbaragli8942
    @andreasbaragli8942 Місяць тому

    google packages not built yet :(

  • @farisaiman2061
    @farisaiman2061 2 місяці тому

    Will the cv2.VideoCapture() still function after the .exe compilation?

    • @andfanilo
      @andfanilo  Місяць тому

      It should since opencv is listed in packages supported by pyodide, but you never know until you try 🤔...do tell us if you try!

  • @muhammadarqam9421
    @muhammadarqam9421 5 місяців тому

    I am getting script execution error: 'Attribute' object has no attribute 'id' when electron app is opened using npm run serveWindows

    • @andfanilo
      @andfanilo  5 місяців тому

      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!

  • @maxlgemeinderat9202
    @maxlgemeinderat9202 10 місяців тому +1

    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  10 місяців тому

      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 10 місяців тому

      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 🤔

  • @shamaldesilva9533
    @shamaldesilva9533 Рік тому +1

    Nice more reasons to use streamlit 🥳🥳🔥

    • @andfanilo
      @andfanilo  Рік тому +1

      I guess! I have to check if I can run those in Github actions now!

  • @pverprogramz641
    @pverprogramz641 7 місяців тому

    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 ?

  • @madhumathy-v1g
    @madhumathy-v1g 4 місяці тому

    @Fanilo Andrianasolo
    streamlit app , converted to exe file i can open the setup exe file but in other system 'exe file' its not opening ?

    • @andfanilo
      @andfanilo  3 місяці тому

      Hey, from memory the stlite build is not cross-platform, so you’re building on windows for other windows machines, but need to build on a Mac for Mac machines and Linux for Linux
      You could do that using GitHub actions for example, by having a build step on multiple operating systems.
      And you need to change the os target in the electron-builder configuration, I remember I talk about this at the end of the video 🤔 (it was a long time ago already..)

  • @BFGHDF
    @BFGHDF 4 місяці тому

    Will this be fast for running a semi intensive polars dataframe' process?

    • @andfanilo
      @andfanilo  4 місяці тому

      Hmmm I don't think Polars is supported by Pyodide? You'll have to double-check..

  • @aar021
    @aar021 Рік тому

    Next level! Thank you good Sir.

    • @andfanilo
      @andfanilo  Рік тому

      Looking forward to your deployed app :)

  • @saakshimalhotra3926
    @saakshimalhotra3926 5 місяців тому

    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  5 місяців тому

      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!

  • @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!

  • @DrSIyer
    @DrSIyer Рік тому

    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  Рік тому

      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!

  • @marcussrm4260
    @marcussrm4260 8 місяців тому

    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  7 місяців тому

      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 7 місяців тому

      @@andfanilo Hey, thank you very much for helping me with my questions! I'm a big fan of your work!

  • @charlottepetters283
    @charlottepetters283 6 місяців тому

    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  6 місяців тому

      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 6 місяців тому

      @@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  6 місяців тому

      @@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

  • @sachansiddharth
    @sachansiddharth Рік тому

    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.

  • @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

  • @sstaud1102
    @sstaud1102 8 місяців тому

    Is it possible to use the .exe on a smartphone as well?

  • @marcussrm4260
    @marcussrm4260 8 місяців тому

    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  7 місяців тому

      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 7 місяців тому

      @@andfanilo Hey, thank you very much for helping me with my questions! I'm a big fan of your work!

  • @arthurpouzargue2612
    @arthurpouzargue2612 6 місяців тому

    I have troubles with libraries while running the app, is it possible to do this with docker ?

    • @andfanilo
      @andfanilo  6 місяців тому +1

      Sure, I do think Docker is the better option if everyone has it. Check out docs.streamlit.io/deploy/tutorials/docker

  • @macokaba1964
    @macokaba1964 4 місяці тому

    How do you enable data update to the app?

    • @andfanilo
      @andfanilo  4 місяці тому

      Hey, what do you mean by data update?

  • @RKusprihanto
    @RKusprihanto Рік тому

    Thankyou, will try these later

    • @andfanilo
      @andfanilo  Рік тому

      Let us know how it goes ;)

    • @RKusprihanto
      @RKusprihanto Рік тому

      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 Рік тому

      @@andfanilo ssl error resolved, pyodide_http do the trick.

  • @toto-yi2vd
    @toto-yi2vd Рік тому

    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  Рік тому

      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 :/

  • @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!

  • @amargaikwad
    @amargaikwad 5 місяців тому

    Could you please make a slow speaking and step by step detailed description guide video for noobs like me.

    • @amargaikwad
      @amargaikwad 5 місяців тому

      How to install stlite, npm everything is confusing. 😢

    • @andfanilo
      @andfanilo  5 місяців тому

      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)

  • @user-linjiang
    @user-linjiang Рік тому

    ImportError: Can't connect to HTTPS URL because the SSL module is not available.😭😭😭

  • @WanderNatureDaily
    @WanderNatureDaily Рік тому

    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 :/

    • @WanderNatureDaily
      @WanderNatureDaily Рік тому

      @@andfanilo ok. Thanks for the fast response :)

  • @Xemnas2309
    @Xemnas2309 Рік тому

    Need network to use app ?

  • @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!

  • @arthurribeiro1452
    @arthurribeiro1452 Рік тому

    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  Рік тому +2

      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!

  • @greciaguerrero218
    @greciaguerrero218 6 місяців тому

    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  6 місяців тому +1

      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 😐

  • @Konstantin-h3l
    @Konstantin-h3l Рік тому

    i love u man. GJ!

  • @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!

  • @ant-one7345
    @ant-one7345 Рік тому

    Hey,
    Thanks for the great contents!
    Any plans to make similar stuff with shiny for python?

    • @andfanilo
      @andfanilo  Рік тому +1

      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 Рік тому

      Hey @andfalino,
      I would prefer and watch Shiny quick start 😊
      Have a great day!

  • @MasterMan2015
    @MasterMan2015 2 місяці тому

    Is it possible to convert Gradio app to .exe the same way ?

    • @andfanilo
      @andfanilo  2 місяці тому

      Should be possible thanks to Gradio-lite (just like electron-builder packs stlite, it could pack gradio-lite)
      Though no work has been done yet for priority reasons, it’s described in on github.com/gradio-app/gradio/issues/7032#issuecomment-2160631327

    • @MasterMan2015
      @MasterMan2015 2 місяці тому

      @@andfanilo thanks. I did it using Pyinstaller

    • @andfanilo
      @andfanilo  2 місяці тому

      @@MasterMan2015 Nice, glad it worked! Do you have a writeup or tutorial to share other people :) ?

  • @jtekmmx
    @jtekmmx Рік тому

    Very well done

    • @andfanilo
      @andfanilo  Рік тому

      Thanks for watching, hope to see you around :)

  • @arjundev4908
    @arjundev4908 Рік тому

    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  Рік тому +1

      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

  • @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 🙂

  • @gekacrazy
    @gekacrazy Рік тому +2

    😭😭😭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 UA-cam comments :/

    • @ErenBoi-gz3jz
      @ErenBoi-gz3jz 9 місяців тому

      hello @gekacrazy, did you find any solution because I am also facing the same issue. Thank you in advance.

    • @nicolo1140
      @nicolo1140 8 місяців тому

      Same here 😭. Did you find any solutions?

  • @SanjaySharma-rl3xu
    @SanjaySharma-rl3xu Рік тому

    Fanilo, can you make a video on using Django and streamlit?

    • @andfanilo
      @andfanilo  Рік тому

      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 Рік тому

      @@andfanilo I was thinking more in terms of beautification of streamlit application using other web frames.

  • @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...

  • @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 :)

  • @rkailassh
    @rkailassh Рік тому

    This is wonderful, i want to know will it work without the internet?

    • @andfanilo
      @andfanilo  Рік тому +1

      It should yeah as all the resources are embedded in the built stlite app. My computer at the end did not have Internet

  • @bartimeux
    @bartimeux 4 місяці тому

    On rigole, on essaye d'apprendre à jongler et on va au futsal avec les collègues, ET PAF
    8 ans plus tard on se retrouve à prendre des leçons de packaging Streamlit par Fanilo. Super. T'aurais pas pu m'apprendre ça y'a 8 ans ? Parce que je sais toujours pas jongler, pour info !

  • @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 10 місяців тому

      Build stuff, stop exploring libraries

    • @smanzoli
      @smanzoli 9 місяців тому

      @@denisblack9897stoooopidiest advice EVER.

  • @abdulrahmansabri4547
    @abdulrahmansabri4547 Рік тому +1

    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 8 місяців тому +1

      I also experience this issue. Anyone able to solved this?

    • @edustemlab
      @edustemlab 7 місяців тому

      Use the requirements.txt method

  • @tomvice
    @tomvice Місяць тому

    Why

  • @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 :/

  • @philtoa334
    @philtoa334 Рік тому

    Nice.

  • @iammcqwory
    @iammcqwory Рік тому

    asante sana

  • @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  Рік тому +1

      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 :)

  • @S-Lomar
    @S-Lomar Рік тому

    😍😍💕💕💕💕🥰🥰💕💕

  • @tomvice
    @tomvice Місяць тому +1

    Why would you not user docker. How is an exe useful. Shoehorning a web app into a bs windows executable is just lame

  • @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?

  • @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