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

Matplotlib not installing #111732

Open
tmjo opened this issue Feb 28, 2024 · 17 comments
Open

Matplotlib not installing #111732

tmjo opened this issue Feb 28, 2024 · 17 comments

Comments

@tmjo
Copy link

tmjo commented Feb 28, 2024

The problem

Help needed. With the update to HA 2024.2 lots of people had problems several different custom integrations that depend on matplotlib. This seemed to be fixed with the release of HA 2024.2.3 including this fix (removed pinning of version).

I'm maintaining two custom integrations myself, and the 2024.2.3 fixed it for me. I'm on NUC with HAOS/proxmox. However, it seems several users of my integrations (and other integrations) seemed to be unable to get matplotlib installed. They seem to be on Rpi4. Can this be related to the issue? The original version pinning had the comment # Matplotlib 3.6.2 has issues building wheels on armhf/armv7 and since it is now working on three different instances on my side (two HAOS/proxmox + devcontainer) but still is not working for many people, I kindly ask for someone smarter than me to take a look.

Sorry if details or logs are not good enough, it is hard for me to get it exact since my systems are working, but others not.

What version of Home Assistant Core has the issue?

core-2024.2.3

What was the last working version of Home Assistant Core?

core-2024.1.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Several custom integrations, but issue related to installation of matplotlib (possibly on Rpi4)

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.util.package
Source: util/package.py:122
First occurred: 07:48:23 (1 occurrences)
Last logged: 07:48:23

Unable to install package matplotlib: error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [123 lines of output] /tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools_scm/git.py:308: UserWarning: git archive did not support describe output warnings.warn("git archive did not support describe output") /tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools_scm/git.py:327: UserWarning: unprocessed git archival found (no export subst applied) warnings.warn("unprocessed git archival found (no export subst applied)") /tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools_scm/_integration/setuptools.py:90: UserWarning: version of matplotlib already set warnings.warn(f"version of {dist_name} already set") Edit mplsetup.cfg to change the build options; suppress output with --quiet. BUILDING MATPLOTLIB python: yes [3.12.1 (main, Jan 4 2024, 11:43:50) [GCC 13.2.1 20231014]] platform: yes [linux] tests: no [skipping due to configuration] macosx: no [Mac OS-X only] running egg_info writing lib/matplotlib.egg-info/PKG-INFO writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt writing requirements to lib/matplotlib.egg-info/requires.txt writing top-level names to lib/matplotlib.egg-info/top_level.txt Traceback (most recent call last): File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/numpy/core/init.py", line 24, in from . import multiarray File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/numpy/core/multiarray.py", line 10, in from . import overrides File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/numpy/core/overrides.py", line 8, in from numpy.core._multiarray_umath import ( ImportError: Error loading shared library /tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/numpy/core/_multiarray_umath.cpython-312-aarch64-linux-musl.so: Operation not permitted During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/numpy/init.py", line 130, in from numpy.config import show as show_config File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/numpy/config.py", line 4, in from numpy.core._multiarray_umath import ( File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/numpy/core/init.py", line 50, in raise ImportError(msg) ImportError: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed. We have compiled some common reasons and troubleshooting tips at: https://numpy.org/devdocs/user/troubleshooting-importerror.html Please note and check the following: * The Python version is: Python3.12 from "/usr/local/bin/python3" * The NumPy version is: "1.26.4" and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help. Original error was: Error loading shared library /tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/numpy/core/_multiarray_umath.cpython-312-aarch64-linux-musl.so: Operation not permitted The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 279, in File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/init.py", line 103, in setup return distutils.core.setup(**attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) ^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command super().run_command(command) File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 321, in run self.find_sources() File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 329, in find_sources mm.run() File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 550, in run self.add_defaults() File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 588, in add_defaults sdist.add_defaults(self) File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/command/sdist.py", line 102, in add_defaults super().add_defaults() File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults self._add_defaults_ext() File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 335, in _add_defaults_ext build_ext = self.get_finalized_command('build_ext') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 305, in get_finalized_command cmd_obj.ensure_finalized() File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized self.finalize_options() File "", line 80, in finalize_options File "/tmp/pip-install-s3tvc8zq/matplotlib_5e4e40aaaef945b6b53154da3ae1b3a1/setupext.py", line 403, in get_extensions add_numpy_flags(ext) File "/tmp/pip-install-s3tvc8zq/matplotlib_5e4e40aaaef945b6b53154da3ae1b3a1/setupext.py", line 511, in add_numpy_flags import numpy as np File "/tmp/pip-build-env-to_i48br/overlay/lib/python3.12/site-packages/numpy/init.py", line 135, in raise ImportError(msg) from e ImportError: Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.`

Additional information

No response

@tmjo
Copy link
Author

tmjo commented Feb 28, 2024

My two integrations that has this problems: norwegianweather and norwegiantide. It was initially raised by author of another custom integration here which was closed as everyone thought it was ok with HA 2024.2.3 but later reports came in that is doesn't work.

@Bucky2k
Copy link

Bucky2k commented Feb 28, 2024

Can confirm that the errors mentioned for the tibber_custom integration also occur using a RPI4 with HAOS image

@jugla
Copy link
Contributor

jugla commented Mar 1, 2024

Thanks for creating this ticket !

@pmi1805
Copy link

pmi1805 commented Mar 12, 2024

Can confirm that the errors mentioned for the tibber_custom integration also occur using a RPI4 with HAOS image

Same on RPi5 with fresh installation. Verifying yaml brings: „Integration error: tibber_custom - Requirements for tibber_custom not found: ['matplotlib'].“

@Bucky2k
Copy link

Bucky2k commented Mar 15, 2024

So - any ideas left?

@tmjo
Copy link
Author

tmjo commented Mar 15, 2024

@sbyx @MartinHjelmare; sorry for tagging, but since you were involved in the previous fix, I'm humbly asking for assistance here. Any ideas of what can be done?

@spacegaier
Copy link
Member

If this is specific to HAOS, then raising the issue in the corresponding repo might help: https://github.com/home-assistant/operating-system

@cortado
Copy link

cortado commented Jul 23, 2024

Still a problem, did someone capable raise the issue to HAOS repo? sorry for tagging, but @tmjo is this something you could help with? Using NorwegianTide on RPi4 with HAOS 12.4 (Core 2024.7.3) and hope so much it will return to work 🙏

@mdisabato
Copy link

I am on a Raspberry Pi 4 (versions attached) using the following configuration:
Core. 2024.7.4
Supervisor 2024.06.2
Operating System 12.4
Frontend 20240710.0

configuration.yaml

skyfield platform

  • platform: ha_skyfield
    show_constellations: false
    show_time: true
    show_legend: true
    north_up: true

When doing a configuration check, I get a spinning circle for 20 minutes and then then:

Configuration warnings
Platform error 'camera' from integration 'ha_skyfield' - Requirements for ha_skyfield not found: ['matplotlib'].

Again, this is on an 8GB RPi 4

Thank you.

Michael
Screenshot 2024-08-04 at 21 55 32
Screenshot 2024-08-04 at 22 04 36

@dobakszilard
Copy link

Dear @frenck

Would you please check this issue for Raspberry pi 4 and pi 5 ?

@wheindl
Copy link

wheindl commented Sep 14, 2024

This is marked "closed," but the issue still persists (matplotlib not installing on RPi running any version of Home Assistant after 2024.2. Has there been any progress, or is this project (or at least the graph feature that is a key part of the project) being abandoned?

@dobakszilard
Copy link

Unfortunately, no, as I looked, there should be a wheel for matplotlib, because only python 3.11 "https://wheels.home-assistant.io/musllinux-index/matplotlib/" is up here, I don't know who made this, but I think this would be the solution if the musllinux matplotlib wheel would be ready for python 3.12

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@typxxi
Copy link

typxxi commented Dec 13, 2024

still open and is really annoying and frustrating
it makes checking the logs frustrating

@irennert
Copy link

Does anyone have or is working on a solution on how to to get metaplotlib integrated?
Obviously integrations like Tibber can not be used any more without metaplotlib.

@alexohneander
Copy link

Same here, can no longer use the Tibber_Custom integration. Is there any way to install the packages manually?

Many in the community build graphs with metaplotlib and for almost a year this is no longer possible. This is very frustrating.

@ngelotte
Copy link

Same here. I am stuck not updating Home Assistant so that I can keep using the worldtidesinfo integration because Matplotlib cannot run on my Raspberry Pi 4 with HAOS.

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

No branches or pull requests