holzschu / a-shell

A terminal for iOS, with multiple windows
BSD 3-Clause "New" or "Revised" License
2.63k stars 116 forks source link

Python streamlit does not work #521

Open ChrisSpoti opened 1 year ago

ChrisSpoti commented 1 year ago

Hi All,

Is it possible to support python’s streamlit ? When I try to install and run it I always get the following errors.

thanks a lot, Chris

$ streamlit hello

Traceback (most recent call last): File "/var/mobile/Containers/Data/Application/A814CBC8-A7FE-48B 7-ACC3-27937915D953/Library/bin/streamlit", line 5, in <module> from streamlit.web.cli import main File "/var/mobile/Containers/Data/Application/A814CBC8-A7FE-48B 7-ACC3-27937915D953/Library/lib/python3.11/site-packages/streamli t/__init__.py", line 50, in <module> from streamlit.version import STREAMLIT_VERSION_STRING as _ST REAMLIT_VERSION_STRING File "/var/mobile/Containers/Data/Application/A814CBC8-A7FE-48B 7-ACC3-27937915D953/Library/lib/python3.11/site-packages/streamli t/version.py", line 20, in <module> from importlib_metadata import version as _version ModuleNotFoundError: No module named 'importlib_metadata' ost recent call last): File "/var/mobile/Containers/Data/Application/A814CBC8-A7FE-48B 7-ACC3-27937915D953/Library/bin/streamlit", line 5, in <module> from streamlit.web.cli import main File "/var/mobile/Containers/Data/Application/A814CBC8-A7FE-48B 7-ACC3-27937915D953/Library/lib/python3.11/site-packages/streamli t/__init__.py", line 50, in <module> from streamlit.version import STREAMLIT_VERSION_STRING as _ST REAMLIT_VERSION_STRING File "/var/mobile/Containers/Data/Application/A814CBC8-A7FE-48B 7-ACC3-27937915D953/Library/lib/python3.11/site-packages/streamli t/version.py", line 20, in <module> from importlib_metadata import version as _version ModuleNotFoundError: No module named 'importlib_metadata'

holzschu commented 1 year ago

I'm a little sceptical about how you could use a graphics user interface library in pure-text application.

But I think the main blocking point is going to be the JavaScript flavor: streamlit seems to depend a lot on React, which is not available on iOS.

ChrisSpoti commented 1 year ago

First of all, many thanks for your awesome application ! I read issue #494 about the tkinter, that there's currently no way to connect to the iOS GUI from inside the terminal. As I understand it, KivyMD doesn't work either. So, I thought about Python with any Web UI. The goal is to have python with any simple GUI. Do you plan to have any GUI for A-Shell in the future ?

holzschu commented 1 year ago

The plan is for a-Shell to remain a text-based terminal (mainly because adding a GUI is a lot of work). However:

I'm not strongly against adding support for another GUI, it's more that there's already a lot of things to do, and these things look impressive.

ifuchs commented 1 year ago

I could be completely mistaken but I didn't think that Streamlit would require you to have a GUI in a-shell as it creates webapps. However, there may be required libraries that are not present and cannot be user installed.