Import the library
The official App cannot import files the way Pybricks does, so you install the EXP6 library on the hub once; after that every Python project just needs three import lines at the top. Without them the hub does not know what MBC_EXP6 means and you get an ImportError or NameError.
- Download install_exp6_lib.llsp3 (the installer). The library it installs is called
MBC_exp6_SPIKE_App_Lib. - Connect the hub to the official SPIKE App by USB or Bluetooth, choose File → Open, pick this file and press ▶ once. When the console says "Installation Successful!", it is installed.
- You only do this once. After you reinstall or update the hub firmware the library is wiped, so run it again. To remove it, run
Uninstall_MBC_exp6_Lib.pyfrom the download pack. - Make a new Python project and type the three lines below at the very top (marked ① in the program on the right).
First time? Step-by-step version (you can also copy and paste Install_MBC_exp6_Lib.py): Education install guide.