Activity Browser in WASM #47
michaelweinold
started this conversation in
Strategy and Planning
Replies: 2 comments
-
thanks so much @michaelweinold - this is a great overview! Option 2 should, in principle, be the easier solution, but we have had issues packaging the AB in the past (we have tried it several times over the years and sometimes it worked, we had even a Windows installer for it, but it is never simple... e.g. right now using pyinstaller produces an .exe file, but then the latter fails as it cannot find a module 'openpyxl.cell._writer', which is apparently used in bw2io... (I didn't go further than that) |
Beta Was this translation helpful? Give feedback.
0 replies
-
This might also be interesting: https://wasmer.io |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Note
Following discussions with @bsteubing, I understand that the primary issue for new users of the Activity Browser is the interaction with the Conda/Python ecosystem. It would be interesting to explore the possibility of "ActivityBrowser in the Browser". This discussion is intended for discussion and knowledge-transfer related to this effort. While @michaelweinold won't have time to contribute, he is happy to share the WASM knowledge he has gathered so far with Brightway Live.
The ActivityBrowser currently uses PySide, a Python binding for the cross-platform tool Qt to provide a GUI for underlying ActivityBrowser/Brightway functionality.
After some investigation, it seems that there are two viable options to achieve a comparable user experience:
Option 1: GUI in WASM
The idea of having a complex GUI of a Python package run in the browser, with the Python package also running in the browser is intriguing. There are efforts in nearly every Python GUI framework to make this happen. It is my judgement that even the most advanced efforts (Qt, see below) will take a 1-2 more years until they are production ready.
Qt
There are efforts to make Qt work with WASM. This includes the original author of PySide (=Qt for Python).
In addition, there are some tutorials that combine Qt with WASM already, but I'm not sure this is what would be applicable here:
PySimpleGUI
The developers of PySimpleGUI, an alternative to Qt are also working on WASM support.
Conclusion: I am confident that Python (including Python GUIs) in the Browser will be the future of (at the very least teaching) the Python language. Unfortunately, we're not there yet. I recommend not to pursue development efforts to enable a WASM-based GUI for the ActivityBrowser.
Option 2: Package the ActivityBrowser (
.exe
/.dmg
)My knowledge here is limited, but a ChatGPT4/Bing query returned some packages with nice support for Qt-based code:
It seems that this would solve most issues new users face. I don't have the experience to provide an estimate of the additional overhead or development effort that would be involved. Maybe more knowledgable parties (cough @cmutel cough) could chime in.
Beta Was this translation helpful? Give feedback.
All reactions