WTH is going on with Docker/Container installs and third-party integrations that need Python modules?

Hey guys, I recently ran into this same problem and perhaps made a thread in the wrong sub-forum here: Migrating to Container - Custom Components Python Issue - #8 by kentoe

I went from pyenv core install and due to the deprecation of my installation decided to change over to docker. When moving my configuration directory over and pointing my container to the original configuration I am getting similiar issues with HACS installs.

Is there some sort of procedure or change I need to make to my directories to allow HACS and HASS updates to play well going forward?

Example error:

Unable to install package spotifywebapipython>=1.0.255: error: failed to remove file /usr/local/lib/python3.13/site-packages/xmltodict-0.13.0.dist-info/INSTALLER : Permission denied (os error 13)

Also attempted to set the ENV with no success:

environment:
      - PIP_TARGET=/config/deps
      - PYTHONPATH=/config/deps
      - PIP_NO_CACHE_DIR=1

EDIT: Nevermind, I looked at the Github and Baloob’s comment and the container has to be run as root. I removed my user: line in my docker-compose and all is working as expected