Error building px4_fmu-v3 from source on Ubuntu 18.04

I’m encountering the exact same errors as described in this topic: problem in Building PX4 · Issue #7184 · PX4/PX4-Autopilot · GitHub. I am using Ubuntu 18.04 and building from a fork of the PX4 firmware git repo. I followed the toolchain install instructions from here Linux · PX4 Developer Guide and the ubuntu_sim_nuttx.sh script ran without errors.

Here is the error message I get when I run “make px4_fmu-v3_default”:

python import error: No module named ‘em’

Required python packages not installed.

On a Debian/Ubuntu system please run:

sudo apt-get install python-empy
sudo pip install catkin_pkg

On MacOS please run:
sudo pip install empy catkin_pkg

On Windows please run:
easy_install empy catkin_pkg

[6/1118] Generating git version header
ninja: build stopped: subcommand failed.
Makefile:171: recipe for target ‘px4_fmu-v3_default’ failed
make: *** [px4_fmu-v3_default] Error 1

I (re)installed python-empy and catkin_pkg as instructed (I also tried pip3 for the latter) and got the same error the next time I tried ‘make distclean’ and build. Any suggestions?

Try this:

pip uninstall em
pip install empy

From: https://answers.ros.org/question/257331/python-module-empy-missing-tutorials/

1 Like

“pip install empy” did the trick. Thanks so much!

I am seeing this same error. I have tried each of the installs suggested; but, still get the error.

Needed to install python3 and pip3. this error no longer occurs.