Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamlit application installer - application python file not present in the installed location #266

Open
DiptenduIDEAS opened this issue Jul 19, 2024 · 2 comments

Comments

@DiptenduIDEAS
Copy link

I have the following code in run_app.py

def main():

    # Getting path to python executable (full path of deployed python on Windows)
    executable = sys.executable

    path_to_main = os.path.join(os.path.dirname(__file__), "home.py")

    # Running streamlit server in a subprocess and writing to log file

However, in the installed folder (or its subfolders), the file home.py is missing

image

The run_app.py file is found in the Python folder

Where is the home.py file?

Here is the snippet from installer.cfg

[Application]
name=XInsight
version=0.1
# How to launch the app - this calls the 'main' function from the 'myapp' package:
entry_point=run_app:main
icon=IDEAS-TIH.ico

[Python]
version=3.10.0
bitness=64

and this is the source structure

image

@DiptenduIDEAS
Copy link
Author

Sorry, the run_app.py file was found in the pkgs folder after installation, not in Python folder

image

@takluyver
Copy link
Owner

Have you had a look at the streamlit example? I think your home.py is equivalent to app.py in the example

This is a guess, but you might want to put your .py files in a packge, like in that example. If you don't, then Pynsist doesn't know that run_app.py and home.py are connected, so you'd have to tell it to include both, and any other relevant files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants