How to write a GUI in sage
As part of a university project I plan on taking some code I've written in sage and implementing it as a GUI. I've installed sage -i wxPython but now when trying to run import wx from sage I get "No module named wx". Please help!
AFAIK there is no officially supported way to install the wx library or wxPython in the Sage environment. You could do it, of course, but you'd have to do so manually. I think a better bet would be to use a GUI toolkit supplied by your system and use it to wrap Sage (but that depends on what exactly you're trying to do and how).
First of all thank you very much for your comment! And apologies for my lack of technical knowledge in programming. With regards to using a GUI toolkit what would you suggest or how would I access it? I'm using a virtual box to run sage, the code I've written is in sage but uses a package "libbraiding". The hope is I can turn my code into a 'pop out' GUI window and allow the user to change variables ect. Like using wxPython or Tkiner can.
Have you tried to use Tkinter? If it is not installed, you should be able to install it easily.
Hello, thanks for the suggestion. I've tried to install Tkinter by typing both 'sage -i Tkinter' and 'sage -pip install Tkinter' into the Linux terminal however it returns a package not found error :(
Take a look at the "Tcl/Tk" subsection of the "Additional software" section of the installation guide. This should help you. http://doc.sagemath.org/html/en/insta...