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

[Issue-127] Pin version to match apt-installed python3-matplotlib #133

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

jcao-bdai
Copy link
Collaborator

@jcao-bdai jcao-bdai commented Jul 31, 2024

Pin matplotlib version in pyproject.toml so that the installation won’t cause issue in ROS2 setups where matplotlib has been apt-installed and hence pinned to version 3.5.1. This particular version pinning also results in a narrower numpy version range "numpy>=1.22,<2" and an end of support for python 3.7.

This PR is a WIP.

Tests done:

  • Testing workflow: all environments in test matrix are passing except for the following three, with error messages suggesting issues noted for each :
    • ubuntu + python 3.7, windows + python 3.7 (numpy does not have a version for this env);
    • windows + python 3.11, windows + python 3.12 (matplotlib does not provide a wheel for this env);
  • In ROS2 Humble docker (ref https://docs.ros.org/en/humble/How-To-Guides/Run-2-nodes-in-single-or-separate-docker-containers.html):
    • spatialmath-python pip install . (from source) recognized the existing apt-installed matplotlib and kept it without overwriting;
    • "import spatialmath" worked when we further narrowed down numpy version range, due to TypeError: 'numpy._DTypeMeta' object is not subscriptable issue.

NOTE: the other part of the discussion, i.e. the matplotlib related imports should better be confined to sub modules where plotting is actually needed, is not resolved by this PR.

@jcao-bdai jcao-bdai changed the title [Issue-127] Initial testing - directly pin version to match apt-installed python3-matplotlib [Issue-127] Pin version to match apt-installed python3-matplotlib Jul 31, 2024
@jcao-bdai jcao-bdai force-pushed the issue-127/pin-matplotlib-version branch from 91ec70b to a779548 Compare August 1, 2024 12:38
Copy link
Collaborator

@myeatman-bdai myeatman-bdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jcao-bdai jcao-bdai merged commit 85c7373 into master Sep 13, 2024
15 checks passed
@jcao-bdai jcao-bdai deleted the issue-127/pin-matplotlib-version branch September 13, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants