-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support ROS 2 Jazzy / Ubuntu 24.04 #169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need a bit more time to diagnose wtf is going on here, I partially blame my arm64 processor but no idea if that's the case.
So asking my dumb question for clarification while I do that...
docker/Dockerfile
Outdated
RUN python3 -m venv ${VIRTUAL_ENV} | ||
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm learning a lot about venvs from you! In this case I might need a little more information - since it feels very "un-docker-y" to use a venv (I don't know if that's true). Would it be preferable to add a test target after installing baseline dependencies in the pyrobosim
image? Is there some specific advantage to a venv?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some weird issues that I run into building the base
image... definitely unrelated here but man pip is messing me up.
8.903 Collecting PyQt5 (from pyrobosim==1.2.0)
8.931 Downloading PyQt5-5.15.10.tar.gz (3.2 MB)
11.68 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 1.2 MB/s eta 0:00:00
11.95 Installing build dependencies: started
17.11 Installing build dependencies: finished with status 'done'
17.11 Getting requirements to build wheel: started
17.18 Getting requirements to build wheel: finished with status 'done'
17.18 Preparing metadata (pyproject.toml): started
17.26 Preparing metadata (pyproject.toml): finished with status 'error'
17.26 error: subprocess-exited-with-error
17.26
17.26 × Preparing metadata (pyproject.toml) did not run successfully.
17.26 │ exit code: 1
17.26 ╰─> [23 lines of output]
17.26 pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in Ubuntu >= 23.04 (introduced in Python 3.11) you get an error by default if you directly try pip install packages into system Python (apt installs are fine).
The 2 ways to get around that are:
- Make a virtual environment
- Add the
--break-system-packages
arg (which does not exist as an option in older versions)
Neither of them is ideal, but the first one can be made to work in both older and newer versions... at some cost as you can see here.
The 2nd option can be implemented with some logic that checks the Python and/or Ubuntu version and adds the argument only for newer versions. This would prevent the need for a venv in the Dockerfile AND let us actually run colcon test
. So maybe this is preferable even if ugly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for your error, I wonder if the version of PyQt5 released for your architecture is wonky. See if you can install a different version than whatever is pinned, or maybe pin it to an older version if not set in the requirements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I found a much better solution!
ENV PIP_BREAK_SYSTEM_PACKAGES=1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead
This one seems like a known issue... sigh
altendky/pyqt-tools#120
I guess if you put the image to something that uses Python 3.10 or earlier, you'll be at least able to work for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is now moot because of your migration off PyQt5... but for the build issues I ran into I just needed to apt-get install -y qtbase5-dev
prior to installing the Python package. I guess you need to have the build tools installed and for some reason in my docker build they just weren't... Also needing to somehow auto accept the GPL license terms.
Either way if you merge the migration all those issues go away and I can have that hour of my life back.
This PR switches to use ROS (not OSRF) Docker images and also adds Jazzy support now that it's out.