My need is to put all the content (Python + App) on an usb key which can be used on demand on different computers. I tried using my Streamlit installation but of course when I put the Portable Python with Streamlit on an usb key, the streamlit.exe try to search like if it was on the previous installation.
Is it possible to use Streamlit with Python Portable on Windows without installation right ?
So for information, modifying the streamlit.exe changing the path of the python interpreter do the job. After you just have to go on the streamlit.exe directory with cmd and launch streamlit.exe run path_of_the_python_script.
I think an improvment could be to put this python path on a configuration file called by streamlit.exe. With that, Streamlit can become portable.
Glad you were able to figure that out @cloud. This feels like one of those edge cases that if the community implemented it, we might consider merging a pull request, but it’s probably not something we’d work on ourselves. From my brief Google searching, it doesn’t look like Python Portable is supported anymore?
I resolved it patching streamlit.exe but it is not a long term solution. Maybe I’ll try to automate it with pefile library.
Technically, if streamlit readed the python path in a file, it could resolve it and permit to use the same streamlit.exe for differents python interpreters. We could also just imagine the same like currently but just a system to overwrite this value with a config file.
Hey @cloud, thanks for the proposed solution!
I have no experience in working with PE files. Could you give some guidance on how did you edit the python interpreter path inside Scripts/streamlit.exe ?
I’ve tried to dig a little on pefile library buy couldn’t exactly understand where to find and how to edit the python interpreter path in the .exe file.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.