Python Lab is Code.org’s browser-based environment for writing and running Python code. Whether you're just getting started or supporting students in the classroom, this FAQ covers everything you need to know—from technical requirements and accessibility to sharing projects, using libraries, and troubleshooting.
What are the technical requirements for using Python Lab?
There are no special requirements beyond the standard Code.org system requirements which can be found here. Python Lab runs in the browser and does not require any special downloads or software.
Are there resources for learning more about Python?
Yes - Python Lab is used in Code.org’s Programming Fundamentals curriculum, a 3-week introduction to Python programming. This course is designed for beginners and includes interactive lessons, practice, and projects.
For students who use screen readers, we recommend using the console-only version of the Programming Fundamentals curriculum, which is fully accessible.
Is Python Lab accessible?
Yes - Console mode is WCAG Level AA compliant with support for keyboard navigation and screen readers. Neighborhood mode, specifically the visual output, is not screen reader accessible.
What libraries can I use in Python Lab?
Python Lab includes a set of built-in libraries:
-
Standard Python libraries
-
Data science libraries, such as:
-
pandas
-
matplotlib
- numpy
-
pandas
- Code.org custom library - neighborhood
Learn more about supported libraries here.
Can I link or import code from GitHub?
Direct linking or importing from GitHub is not supported in Python Lab. We do have a workaround where you can download files from your Python Lab project and manually upload them to GitHub.
Why won’t Python Lab run when I open it?
When you first open Python Lab, the program and python interpreter may take a few moments to fully load. If the Run button appears grayed out, wait up to 30 seconds for the lab to initialize. Once it's ready, the button will become clickable.
Can I share and remix Python projects?
Yes! Students can both share their Python Lab projects and remix projects created by others, making it easy to collaborate and build off each other’s work.
How do I use the Python Lab backpack?
The Backpack allows students to move files between levels or projects. Below are the steps to add files, delete and import files to your backpack.
- Add a file to your backpack
- Import a file from your backpack
- Delete files from your backpack
Note: Projects cannot contain two files with the same name. If you try to import a file with a duplicate name, you’ll be prompted to replace the existing file or rename the one you’re importing.
The backpack is most useful in multi-level experiences. It is not typically needed for standalone levels.
What is level validation in Python Lab and how does it work?
Level validation is an automated assessment tool used in some Python Lab levels to check whether a student’s code meets the expectations of a level.
When students click the Validate button, their code is tested against a set of pre-written checks created by Code.org's curriculum team. These validation tests help determine whether the code behaves as intended.
Validation results appear in two places:
- The Instructions panel, showing a summary of passed and failed tests
- The Console, where students receive feedback, error messages, and hints
Each test result is marked as:
- ✅ Pass – Code met expectations
- ❌ Fail – Code did not meet expectations; feedback is provided
- ⏭️ Skipped – A prerequisite test failed
- ‼️ Error – The test couldn’t run due to a code error
The level is considered complete only when all tests pass. If any tests fail, are skipped, or result in an error, the Continue/Finish button stays disabled.