Edit third-party library in development container

If you’re trying to modify a third-party library using the development container in VS Code, the path you need is:

/home/vscode/lib/python3.11/site-packages

A better way to do this is clone the library into the share folder which is mapped into the dev container. Modify the library in this copy and then install that library from the terminal inside the dev container with:

pip install -e [path to library]

Doing this means that when you modify the library, on HA restart changes are picked up but also, if you have to rebuild container (ie for updated HA version), you do not loose your code changes in the library.

1 Like