- Install required packages from terminal.
sudo apt-get install python3-dev python3-pip
- Install dronekit Python module.
python3 -m pip install dronekit
- To update the Dronekit for using the latest version, run the command.
python3 -m pip install dronekit --upgrade
- If you are using Python 3.10 or above, you need to add the following lines before importing dronekit.
import sys
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
import collections
from collections.abc import MutableMapping
setattr(collections, "MutableMapping", MutableMapping)
- Or just simply import the
dronekit_python310_compat
module inside the project.
import dronekit_python310_compat