First time macOS Catalina toolchain compile error

Hey everyone, new px4 user here. I’m running an up to date version of macOS Catalina on a relatively new Macbook Pro 16", and following the instructions for installing the px4 toolchain here.

I’m getting a build error that others have reported from time to time, but I can’t seem to find the actual solution. Here are the important bits. If you need more context, I’ll add it.

% make px4_sitl jmavsim

Failed to import toml: No module named ‘toml’

You may need to install it using:
pip3 install --user toml

Failed to import em: No module named ‘em’

You may need to install it using:
pip3 install --user empy

Failed to import jinja2: No module named ‘jinja2’

You may need to install it using:
pip3 install --user jinja2

[13/734] Generating git version header
ninja: build stopped: subcommand failed.
make: *** [px4_sitl] Error 1

Trying the pip3 install commands shows they are in fact installed already:

% pip3 install --user toml
Requirement already satisfied: toml in /Users/aaa/Library/Python/3.7/lib/python/site-packages (0.10.1)
You are using pip version 19.0.3, however version 20.2b1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.

Any ideas?

Well, I solved the issue with a sudo hammer. I ran each of the pip3 install commands prefaced by sudo, which I am usually loathe to do.

Was there a better way?

Why are you loath to use sudo? If sudo is NOT required then just anybody can run the command.
FWIW I did not need to use sudo on Catalina.

And why do you want to go to Mars?

I believe use of macOS and unix derivatives in general shouldn’t need to override the default permissions, it’s usually a sign of laziness. In my case, it turns out I didn’t see some solutions in the troubleshooting portion of the install instructions. I should have been more patient.

PS: I saw a tweet yesterday suggesting aliasing ‘sudo’ with ‘please’ :slight_smile:

To meet this bad boy!