-
-
Notifications
You must be signed in to change notification settings - Fork 17
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 installed in HA 2024.2.X #53
Comments
Same problem here with Core 2024.2.0b3, Supervisor 2024.01.1, Operating System 11.4, Frontend 20240202.0
|
Also in the official 2024.2 release it happen :) Logger: homeassistant.setup Setup failed for custom integration 'tibber_custom': Requirements for tibber_custom not found: ['matplotlib']. Details
Logger: homeassistant.util.package Unable to install package matplotlib: error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [579 lines of output] Edit mplsetup.cfg to change the build options; suppress output with --quiet. BUILDING MATPLOTLIB python: yes [3.12.1 (main, Jan 4 2024, 09:41:05) [GCC 13.2.1 20231014]] platform: yes [linux] tests: no [skipping due to configuration] macosx: no [Mac OS-X only] /usr/local/lib/python3.12/site-packages/setuptools/init.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !! ******************************************************************************** Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try |
I have the feeling this integration is no longer maintained? At least the last update is quite far back. Anyone aware if matplotlib has been fully removed from HA? Edit: OK, HA went to Python 3.12 with the 2024.2.X update and Matplotlib is no longer installed. I guess there is no solution in sight if HA does not reintegrate matplotlib |
really sad that this can happen and it feels like no one cares on the ha developer site. |
How do you come to this conclusion? Its a community integration, you can always fork, repair and push it into the HACS store... Why should NodeRed have any advantage in this regard? |
So if you run Homeassistant in Docker you can always install matplotlib in the environment. Just fallow this steps:
Not sure how do it in other env and this will be lost if you pull an new image. We need to understand why matplotlib can be install in through req in the custom components |
I have HAOS, the ready to go image. There it is not foreseen to install something. |
Thanks, this worked for me. I know it's a temporary fix and will need to be re-applied every time the image changes, but at least my warnings have gone away. Thank you. |
For HAOS, I tried this: https://community.home-assistant.io/t/how-to-install-python-pillow-library-in-home-assistant-os/444086/4 |
Doesn't make a difference, even the lib is installed by the addon, tibber_custom won't load. Maybe the installation of the lib is processed after the inital load of the custom integration. |
@Danielhiversen Are you still active on this integration and maybe you have an idea how to heal the situation? If not or if you don't plan to maintain this integration, then I would actually deinstall it and work on an alternative. Would be great to get a feedback from you! I have already good Apex Plots in place, but I like the exposure of your graph as camera which allowed me to have the graph via widget on my smartphone home screen |
Yes, I plan to keep maintain it, but I do not have this issue and I do not know how to solve it |
Ahh, so you are not running HAOS then? With 2024.2.x Version Python has been updated and I guess we lost the library matplotlib... Probably little we can do as your graph is based on it. Maybe matplotlib is not fully removed but somehow not found by the integration anymore? My knowledge unfortunately does not allow to find out |
Seems that it's still there, not sure whether it has been reinstalled due to my tests @yutani42 mentioned with the custom_deps install. Anyway the integration probably doesn't use that specific version? |
Fix is merged. Should hopefully work again with 2024.2.3. |
Can I already get 2024.2.3 as beta or do I need to wait? Current version is 2024.2.1 |
Beta's are only available for new major releases, starting on the last Wednesday of the month. |
Unfortunately not healed with 2024.2.3 😞 |
For me it's working again in 2024.2.3 |
Strange... Here my error: `Logger: homeassistant.util.package 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.` |
Try renaming your deps directory to deps2 or so and restart HA. This should retrieve all dependencies from scratch. |
Still not working here with 2024.2.3. Restart of HA is not possible, with tibber_custom in configuration.yaml |
Now it works for me as well: Enjoy! |
Thought I did it that way. You have also the Stock RPI image or did you set it up on your own? |
how did you solve this problem? i'm facing the same problem and I even restarted HA after every substep (deinstalltion, installation and reactivation of tibber custom). |
No solution yet - deactivated for now |
I have the Apex based Graph as well (prognosis is new to me, nice!), but what was great about the tibber custom was the exposure via camera - both myself and my wife had it as a widget on the smartphone home screen |
Works for me now without side-install matplotlib. For those that it doesn't work for, have you tried the solution proposed by others? : |
Yes, even with full RPI restarts , same error message in protocol as above |
I am not trying to derail this, but the removal and re-adding with reboots did not do the trick for me. I was getting the matplotlib error, so I modified the code to use pillow instead. You can find my code as a fork here: https://github.com/basraayman/home_assistant_tibber_custom/tree/main and I made sure to link back to this repo. I still need to add some info to the x- and y-axis but I'm happy to have a graph running. All of this running on a rpi 4 with the following versions:
|
any updates when it will be running again ? It is hurting tibber cause they also know about that they have an issue since this feature or function is gone. Time to continue or to archive it cause there are many complains - my HA OS on Pi 4 has no tibber functionality for months and every few month I kept looking here for any update (at least HA OS related). |
It works fine here :) @basraayman, it would be great if you would open a pull request with your changes. |
Works for me as well. Believe @basraayman solution might be treated as another solution and maybe moved to another repo. The one that we have now works well and should not be updated with pillow. |
I´m open to creating a pull request, I can also just create a full on repo and link back to this one with originating credits for the idea. Which would you prefer @Danielhiversen? |
Just to confirm - on the large audience of people using HAOS on Raspi (Stock images) it's not possible to install. But I cannot contribute, I don't have the knowledge to solve the underlying reason |
I just dug into home-assistant/core#111732 and I am also running on a Pi. I will try to see if I can dig into this some more, because this looks like a generic issue with Matplotlib on Raspberry systems. |
yes, I am running HA on pi 4 with 4 gb for years. And I am also unsure if and how I could delete all that tibber stuff to get rid of the warning without killing my tibber pulse. |
So, you can install matplotlib just fine on the Alpine linux image that is used by the Home Assistent OS. You can use apk and install and use it.
The issue seems to be that Home Assistent OS (so not installing HA manually on a running system, but running the image for the Raspberry) has some issues. You can see in the commit here that they remove matplotlib completely: home-assistant/core@d85a92f and it simply now isn´t included. When selecting the to install the tibber custom component, it then tries to use pip to install the module and runs into an error. What might work is modifying the package versions to include matplotlib again and see if we can select a version that would not throw up the wheel error, since there is obviously one that works. Once I have some time I will try to see if that solves it. |
@basraayman Thank you for your solution using pillow! This works great! You mentioned you are about to do a little design things on the graph? Is there still a chance you would do so? Numbers of prices are very small on my screens as you can see here: |
I´m using a Home assistant green device - I don´t know, if is possible to install the missing mathplotlib. For that reason the tibber_custom will not be work anymore. |
Error in the latest beta due to missing matplotlib. Can you look into it when you have time?
The text was updated successfully, but these errors were encountered: