Appdaemon downloads mysql-connector every reboot

In one of my first tries with Appdaemon I started to use the mysql-connector. Then I realized that I didn’t need it and removed the app using mysql directly.
My problem is that Appdaemon downloads and installs mysql-connector every restart:

s6-rc: info: service init-appdaemon: starting
Looking in links: https://wheels.home-assistant.io/musllinux/
Collecting mysql.connector
  Downloading mysql-connector-2.2.9.tar.gz (11.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.9/11.9 MB 30.2 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: mysql.connector
  Building wheel for mysql.connector (setup.py): started
  Building wheel for mysql.connector (setup.py): finished with status 'done'
  Created wheel for mysql.connector: filename=mysql_connector-2.2.9-cp310-cp310-linux_aarch64.whl size=247953 sha256=1c47e67d27e0770639e23ac2182fbdefa04bbd04e0ad2d5375e999832e8ced1a
  Stored in directory: /tmp/pip-ephem-wheel-cache-dxn387h6/wheels/3e/7f/a3/928a40d1ffd01dd16057f308042377afc505d56145375adf40
Successfully built mysql.connector
Installing collected packages: mysql.connector
Successfully installed mysql.connector-2.2.9
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
s6-rc: info: service init-appdaemon successfully started
s6-rc: info: service appdaemon: starting
s6-rc: info: service appdaemon successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[20:53:35] INFO: Starting AppDaemon...

Is there a way make Appdaemon stop downloading mysql-connector?

Remove it from the requirements.txt file in the appdaemon root directory.

Well, I have no requirements.txt in the appdaemon root directory:

If you are running appdaemon as an addon to a HA , I think there is an entry named python_packages in the addon config that you need to edit.

Im running HA core in docker and then appdaemon in a separate docker container and I think the way to include packages is different if appdaemon is not running as an addon to a supervised HA install.

1 Like

Yes, I run it as an addon to HA. Now I saw it in the config and removed it.
It must be me who added it in the config so I can’t blame anyone else.
Thanks for helping me!!!

1 Like

I too run it as an add-on and the packages are needed to run, but is there a way to have appdaemon re-use the ones it’d already downloaded? I understand the need for updates, but to download from scratch on every restart??

Is there a cache setting somewhere?

1 Like