PX4-Autopilot: build on macos14.3 error, and which python3 we should use?
Describe the bug
when I use MacOS Development Environment
, after:
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
cd PX4-Autopilot/Tools/setup
sh macos.sh
output is :
➜ PX4-Autopilot git:(9687324778) sh Tools/setup/macos.sh
px4-dev already installed
Installing PX4 Python3 dependencies
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the package you are trying to
install.
If you wish to install a non-brew-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.
If you wish to install a non-brew packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the package you are trying to
install.
If you wish to install a non-brew-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.
If you wish to install a non-brew packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
All set! PX4 toolchain installed!
➜ PX4-Autopilot git:(9687324778) which python3
/usr/local/bin/python3
➜ PX4-Autopilot git:(9687324778) /usr/bin/python3 --version
Python 3.9.6
➜ PX4-Autopilot git:(9687324778) python3 --version
Python 3.12.2
➜ PX4-Autopilot git:(9687324778)
To Reproduce
following instructions set up a PX4 development environment for macOS
Expected behavior
this instructions in /Tools/setup/macos.sh will running:
python3 -m pip install future
python3 -m pip install --user -r ${DIR}/requirements.txt
Screenshot / Media
No response
Flight Log
non
Software Version
px4 v1.14.2, I want to build px4_sitl
on macos sonoma 14.3.1 (m1).
Flight controller
non
Vehicle type
None
How are the different components wired up (including port information)
No response
Additional context
No response
About this issue
- Original URL
- State: open
- Created 4 months ago
- Comments: 16
I just want to thank you for sharing:
brew uninstall --ignore-dependencies QT
That totally fixed my PX4 gazebo-classic QT build errors on MacOS 13.6.1 Ventura…
Now,
make px4_sitl gazebo-classic
works like a champ.
what is this?
the error fix by
But
make px4_sitl gazebo
still failed.