W00D00 / home-assistant-elero

Elero Centero component
GNU General Public License v3.0
39 stars 10 forks source link

Unable to install package pyserial==3.4: ERROR: Cannot install pyserial==3.4 because these package versions have conflicting dependencies. #29

Closed u20p17 closed 2 years ago

u20p17 commented 2 years ago

Hi, I was using this custom component on my rpi4 and HASS OS some months without any issue. Now I have bought an Intel NUC and have HASS OS running in a VM. Everything is working, but this custom component make some troubles: I copied the elero folder in the custom component folder, configurated the /config/configuration.yaml file and its all linked files like covers and groups like on my rpi4 and then tried to restart HomeAssistant. But this is not possible - I get the following error:

2022-03-03 15:08:55 INFO (SyncWorker_8) [homeassistant.util.package] Attempting install of pyserial==3.4
2022-03-03 15:08:57 ERROR (SyncWorker_8) [homeassistant.util.package] Unable to install package pyserial==3.4: ERROR: Cannot install pyserial==3.4 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
2022-03-03 15:08:57 INFO (SyncWorker_1) [homeassistant.util.package] Attempting install of pyserial==3.4
2022-03-03 15:08:58 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package pyserial==3.4: ERROR: Cannot install pyserial==3.4 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
2022-03-03 15:08:58 INFO (SyncWorker_3) [homeassistant.util.package] Attempting install of pyserial==3.4
2022-03-03 15:08:59 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package pyserial==3.4: ERROR: Cannot install pyserial==3.4 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
2022-03-03 15:08:59 INFO (MainThread) [homeassistant.requirements] Multiple attempts to install pyserial==3.4 failed, install will be retried after next configuration check or restart
2022-03-03 15:08:59 ERROR (MainThread) [homeassistant.components.hassio] The system cannot restart because the configuration is not valid: Integration error: elero - Requirements for elero not found: ['pyserial==3.4'].
Platform error cover.elero - Requirements for elero not found: ['pyserial==3.4'].
2022-03-03 15:08:59 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140408585593376] The system cannot restart because the configuration is not valid: Integration error: elero - Requirements for elero not found: ['pyserial==3.4'].
Platform error cover.elero - Requirements for elero not found: ['pyserial==3.4'].
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 192, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1636, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1673, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 610, in async_handle_core_service
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Integration error: elero - Requirements for elero not found: ['pyserial==3.4'].
Platform error cover.elero - Requirements for elero not found: ['pyserial==3.4'].

UNRAID 0.9.2 Home Assistant core-2022.3.0 Home Assistant OS 7.4 supervisor-2022.01.1 Python-Version | 3.9.9

How can I fix this issue?

Thank you in advance!

u20p17 commented 2 years ago

Could this be related to the latest homeassistant core update (2022.03.0)? In the changelog iti is written:

Integration dependencies and Python pip
In November 2020, with the release of Python pip 20.3, a new dependency resolver was introduced in pip, which is more strict.

Home Assistant held back supporting the new pip version because of the large number of dependencies we have, it took time for us to adjust to this change. Meanwhile, Python pip would only warn for conflicts.

As we have resolved almost all dependency conflicts, we have now lifted the pip version pinning, and thus now use the newer and stricter pip version.

If you use external dependencies in your custom integration, you might be impacted by the new pip resolver. Your dependencies (and their version ranges) must be compatible with the dependencies Home Assistant has; otherwise, the installation of your custom integration will not succeed.

You can find more information on the new dependency resolver in Python pip here:

https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020
peshoteslata2 commented 2 years ago

Hi, I have same problem. But when I change "pyserial==3.4" to "pyserial==3.5" in "init.py" and "manifest.json" integration is working.

pazzotranquillo commented 2 years ago

Hi, I have same problem. But when I change "pyserial==3.4" to "pyserial==3.5" in "init.py" and "manifest.json" integration is working.

I have experiencing the same after updating to 2022.3. Thanks for the hint! I've changed the value and it's working again

u20p17 commented 2 years ago

thank you guys - this solved the problem here too! 👍 should get changed by @W00D00 in his repository :)

W00D00 commented 2 years ago

Hi All,

The fix is f3b068b