I recently encountered a ‘binary_sensor’ error for the Hikvision platform during Home Assistant boot. After reporting the issue, I was asked to test an updated ‘hikvision.py’ file in my HA installation (https://github.com/mezz64/pyHik/issues/93).
I seem to lack access to both /usr/src/homeassistant and /usr/local/lib/python3.11/site-packages/pyhik/ while using the root account on SSH, as I’m running Home Assistant Operating System.
How can I test it? I attempted to place the files in ‘custom_components/pyhik’ and ‘custom_components/hikvision’, but had no luck.
error: externally-managed-environment
× This environment is externally managed
╰─>
The system-wide python installation should be maintained using the system
package manager (apk) only.
If the package in question is not packaged already (and hence installable via
"apk add py3-somepackage"), please consider installing it inside a virtual
environment, e.g.:
python3 -m venv /path/to/venv
. /path/to/venv/bin/activate
pip install mypackage
To exit the virtual environment, run:
deactivate
The virtual environment is not deleted, and can be re-entered by re-sourcing
the activate file.
To automatically manage virtual environments, consider using pipx (from the
pipx package).
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
I’m not sure if I should use the ‘–break-system-packages’ option with pip now?