Skip to main content
All CollectionsTechnology and Integrations
Using Python libraries in Codio
Using Python libraries in Codio

Working with Tkinter/Pygames/MatPlotlib etc

Ian avatar
Written by Ian
Updated over 4 years ago

If you are looking to work libraries where you will have a need to show a visual response, the standard Python stack will not work for you.

Although the Python Stack has Tkinter installed you also need to install X-server to enable the results to be rendered

so either uses the Python Tkinter stack that also has X-server installed or in your existing project or go to Tools>Install Software and install X-server.

When  installed, Restart the Box   (Project->Restart Box) and then execute the file using

python <filename>.py

And then Preview the project (using Box URL) and you'll see it something similar to this (depending on the library and content of your python file)

Click on the Preview menu then select the Box URL option, this will show the visual response (graph) depending on the content of your file and library.

Also be aware that if you install modules or other software to a stack and then add the project to your class, these extra elements may not be included and your students may have to install them. Rather than require them to do this, once you have your project as you require, look to Create your own stack and set this to your project so your students will use this stack and be able to get working right away

Did this answer your question?