How to Convert a Streamlit App to an .EXE Executable

Поделиться
HTML-код
  • Опубликовано: 19 янв 2025

Комментарии • 178

  • @nopewtopieafterzippingafly4168
    @nopewtopieafterzippingafly4168 Год назад +3

    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 11 месяцев назад +1

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

    • @_fifty_shades_of_life_
      @_fifty_shades_of_life_ 9 месяцев назад

      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  Год назад

      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 😁

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

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

  • @BustosEnzo
    @BustosEnzo Год назад +5

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

  • @robel_asefa
    @robel_asefa 9 месяцев назад

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

    • @andfanilo
      @andfanilo  9 месяцев назад

      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

  • @fluffykitties9020
    @fluffykitties9020 11 месяцев назад +1

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

    • @andfanilo
      @andfanilo  11 месяцев назад +2

      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 😥

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

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

  • @smiley3239
    @smiley3239 8 месяцев назад

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

    • @andfanilo
      @andfanilo  8 месяцев назад

      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  Год назад +2

      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!

  • @rayyanmohsin8638
    @rayyanmohsin8638 Месяц назад

    I desperately need this done and it's not working. Looking for someone who could do it for me, willing to compensate.

  • @adilbenmohamed5842
    @adilbenmohamed5842 21 день назад

    hi fanilo is not working good by webdriver_manager and selenium ? why please help me?

  • @YashThakkar-j3t
    @YashThakkar-j3t Месяц назад

    I am getting the error
    ENOENT: no such file or directory, open 'C:\....\build\stlite-manifest.json', The file name is asset-manifest.json.
    Even after changing the file name I get this error:
    entrypoint -- Expected a string, but received: undefined
    Any help ?

  • @freedman1405
    @freedman1405 Месяц назад

    Has anybody experienced having problems with npm install? when I do npm install, it hangs and runs on indefinitely.

  • @MatichekYoutube
    @MatichekYoutube 11 дней назад

    blank window - I have api calls to gpt - is that the cause?

  • @Sonntagssoziologe
    @Sonntagssoziologe 8 месяцев назад

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

    • @andfanilo
      @andfanilo  8 месяцев назад +1

      🙃 Maybe that was my dream job all along
      Have you watched my Epic Book Trailer ( ruclips.net/video/xubQ0lsiV44/видео.html ) ? I feel this one was the most intense I produced 😆

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

  • @aar021
    @aar021 Год назад

    Next level! Thank you good Sir.

    • @andfanilo
      @andfanilo  Год назад

      Looking forward to your deployed app :)

  • @maxlgemeinderat9202
    @maxlgemeinderat9202 Год назад +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  Год назад

      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 Год назад

      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 🤔

  • @devpgm2020pgm
    @devpgm2020pgm 5 месяцев назад

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

  • @madhumathy-v1g
    @madhumathy-v1g 6 месяцев назад

    @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  6 месяцев назад

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

  • @saakshimalhotra3926
    @saakshimalhotra3926 7 месяцев назад

    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  7 месяцев назад

      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!

  • @farisaiman2061
    @farisaiman2061 4 месяца назад

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

    • @andfanilo
      @andfanilo  3 месяца назад

      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 7 месяцев назад

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

    • @andfanilo
      @andfanilo  7 месяцев назад

      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!

  • @zedcodinacademibychinvia9481
    @zedcodinacademibychinvia9481 11 месяцев назад

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

  • @marcussrm4260
    @marcussrm4260 10 месяцев назад

    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  10 месяцев назад

      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 10 месяцев назад

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

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

    • @ErenBoi-gz3jz
      @ErenBoi-gz3jz 11 месяцев назад

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

    • @nicolo1140
      @nicolo1140 10 месяцев назад

      Same here 😭. Did you find any solutions?

  • @marcussrm4260
    @marcussrm4260 10 месяцев назад

    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  10 месяцев назад

      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 10 месяцев назад

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

  • @BFGHDF
    @BFGHDF 6 месяцев назад

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

    • @andfanilo
      @andfanilo  6 месяцев назад

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

  • @pverprogramz641
    @pverprogramz641 9 месяцев назад

    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 ?

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

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

  • @rockershreyak6531
    @rockershreyak6531 Месяц назад

    Does this method still work? I dont think it works anymore, I tried.

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

  • @charlottepetters283
    @charlottepetters283 9 месяцев назад

    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  8 месяцев назад

      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 8 месяцев назад

      @@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  8 месяцев назад

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

  • @arthurpouzargue2612
    @arthurpouzargue2612 8 месяцев назад

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

    • @andfanilo
      @andfanilo  8 месяцев назад +1

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

  • @andreasbaragli8942
    @andreasbaragli8942 3 месяца назад

    google packages not built yet :(

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

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

  • @Xemnas2309
    @Xemnas2309 Год назад +1

    Need network to use app ?

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

  • @macokaba1964
    @macokaba1964 6 месяцев назад

    How do you enable data update to the app?

    • @andfanilo
      @andfanilo  6 месяцев назад

      Hey, what do you mean by data update?

  • @Konstantin-h3l
    @Konstantin-h3l Год назад

    i love u man. GJ!

    • @andfanilo
      @andfanilo  Год назад

      Thanks for the support :D

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

  • @user-linjiang
    @user-linjiang Год назад

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

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

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

  • @Kuldip_07_
    @Kuldip_07_ 6 месяцев назад

    Sir pyodide suport tensorflow?

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

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

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

  • @amargaikwad
    @amargaikwad 7 месяцев назад

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

    • @amargaikwad
      @amargaikwad 7 месяцев назад

      How to install stlite, npm everything is confusing. 😢

    • @andfanilo
      @andfanilo  7 месяцев назад

      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)

  • @sstaud1102
    @sstaud1102 10 месяцев назад

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

  • @MasterMan2015
    @MasterMan2015 4 месяца назад

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

    • @andfanilo
      @andfanilo  4 месяца назад

      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 4 месяца назад

      @@andfanilo thanks. I did it using Pyinstaller

    • @andfanilo
      @andfanilo  4 месяца назад

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

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

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

  • @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 Год назад

      Build stuff, stop exploring libraries

    • @smanzoli
      @smanzoli 11 месяцев назад

      @@denisblack9897stoooopidiest advice EVER.

  • @greciaguerrero218
    @greciaguerrero218 8 месяцев назад

    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  8 месяцев назад +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 😐

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

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

  • @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 10 месяцев назад +1

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

    • @edustemlab
      @edustemlab 9 месяцев назад

      Use the requirements.txt method

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

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

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

  • @tomvice
    @tomvice 3 месяца назад

    Why

  • @philtoa334
    @philtoa334 Год назад

    Nice.

    • @andfanilo
      @andfanilo  Год назад

      Thanks for the support :)

  • @bartimeux
    @bartimeux 7 месяцев назад

    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 !

  • @iammcqwory
    @iammcqwory Год назад

    asante sana

  • @tomvice
    @tomvice 3 месяца назад +1

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

    • @t4n_shahin
      @t4n_shahin 3 месяца назад

      I agree with you

  • @S-Lomar
    @S-Lomar Год назад

    😍😍💕💕💕💕🥰🥰💕💕

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

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

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

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