Install a Python library


Choose Libraries on the toolbar.

image.png


mBlock-Python Editor provides two library installation modes.

image.png

Mode 1: Recommended Libraries


On the Recommended Libraries tab, you can find multiple categories of common Python libraries as well as the official Python libraries released by Makeblock.


Search for the library you want to install by category and click the Install button on the right.

安装库1.gif


After the library is installed, the editor displays a message indicating successful installation, and the Install button turns into Installed.


Mode 2: PIP mode


You can also use the package installer for Python (PIP) mode to install a library.


Input the full name of the library to be installed and click the Install button on the right.

PIP 安装.gif


After the library is installed, the editor displays a message indicating successful installation, and "Successfully installed..." is displayed in the log information.

Uninstall a Python library


Perform the following steps to uninstall a Python library:


1. Choose Libraries on the toolbar.

image.png

2. On the Recommended Libraries tab, search for the library to be uninstalled by category, put your mouse pointer onto the Installed button, and click the button when it turns into Uninstall.

卸载.gif

After the library in uninstalled, the button turns into Install.


Note:

If the library to be uninstalled was installed in PIP mode before and does not belong to any specific category on the Recommended Libraries tab, you can find it in the Others category and uninstall it.