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 · 7 comments
Open

Matplotlib not installing #111732

tmjo opened this issue Feb 28, 2024 · 7 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

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

5 participants