Skip to content

Dependency conflict due to outdated python3-sympy from apt (v1.9) blocks newer PyTorch installations #122

@nspiegelhalter

Description

@nspiegelhalter

Hello,

I am encountering a dependency conflict stemming from the version of python3-sympy that is installed via apt as part of the ROS 2 Humble ecosystem.

I am trying to install a recent version of PyTorch (2.6.0) which depends on a newer version of SymPy (version 1.13.1) than what is currently available via apt (version 1.9).

$ apt list --installed | grep sympy
python3-sympy/jammy,now 1.9-1 all [installed,automatic]

$ aptitude why python3-sympy
i   ros-humble-ros-gz           Depends ros-humble-ros-gz-sim-demos
i A ros-humble-ros-gz-sim-demos Depends ros-humble-rqt-plot        
i A ros-humble-rqt-plot         Depends python3-matplotlib         
i A python3-matplotlib          Depends python3-fonttools          
i A python3-fonttools           Depends python3-sympy

I considered the following workaround: RUN pip install --upgrade sympy --ignore-installed . However, this is problematic, as it may lead to ambiguous imports depending on how the PYTHONPATH is resolved and doesn't guarantee that sympy from pip takes precedence over the one from apt.

I also considered RUN apt-get remove -y --purge python3-sympy but I am not sure if the ROS2 humble packages will work with the upgraded sympy version.

Could the version of python3-sympy in ROS 2 Humble be updated to a more recent release (e.g. ≥1.13.1) in a future Humble sync? If an update is not feasible due to compatibility concerns, would it be possible to document a safe workaround for users who need newer versions?

Thanks for considering this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions