Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup: Ubuntu setup Python >= 3.11 installation workaround #23707

Conversation

TannerGilbert
Copy link

@TannerGilbert TannerGilbert commented Sep 22, 2024

Note

This PR is heavily based on work by @MaEtUgR in #23126

Solved Problem

Starting with Python 3.11 installing packages into externally managed python installations is restricted. This leads to installation problems on Ubuntu 24.04 which uses Python 3.12 by default. As discussed in #23126 the best way to make the installation work on Ubuntu 24.04 would be to introduce full virtual environment support. This is already tackled by #23126 and #23228 but doesn't work as expected yet. Therefore as a temporary workaround --break-system-packages should be used similary to what was added for the Arch install in #21340.

Alternatives

Finish virtual environment PRs.

Test coverage

Tested on Ubuntu 24.04 VM and Docker container.

Testing steps:

git clone https://github.com/TannerGilbert/PX4-Autopilot
bash PX4-Autopilot/Tools/setup/ubuntu.sh
cd PX4-Autopilot
make px4_sitl
make px4_sitl gz_x500

Test Dockerfile:

FROM osrf/ros:jazzy-desktop-full

RUN apt update && apt install -y git wget

RUN git clone --recursive -b fix/ubuntu-24.04-installation-workaround https://github.com/TannerGilbert/PX4-Autopilot /root/PX4-Autopilot

RUN bash /root/PX4-Autopilot/Tools/setup/ubuntu.sh

RUN git clone https://github.com/zeromq/cppzmq.git && \
    cd cppzmq && \
    mkdir build && \
    cd build && \
    cmake .. && \
    make install

WORKDIR /root/PX4-Autopilot

RUN make px4_sitl

CMD [ "bash" ]

@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/installing-px4-on-ubuntu-24-04-x64-vm/39365/5

@mrpollo
Copy link
Contributor

mrpollo commented Sep 30, 2024

Superceded by #23745

Thank you @TannerGilbert

@mrpollo mrpollo closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants