Can't uninstall homeassistant during upgrade in venv

Everytime I upgrade homeassistant installed in a venv via
pip3 install --upgrade homeassistant
I get these weird messages about not being able to uninstall homeassistant. But youll notice that everything still upgrades fine. Any thoughts on what is going on?

Are you running pip as the homeassistant user or as root? Did you try upgrading pip (pip install --upgrade pip)? I would do both as the homeassistant user only.

You could also just completely recreate the venv and install homeassistant again. I would try upgrading pip first.

Thanks for the reply. I am running it from the homeassistant user.

Not this cycle, but maybe a few versions ago, I tried deleting the /srv/homeassistant folder and reinstalling. I still get the error.

I will try upgrading pip before the next upgrade. I don’t have high hopes, but given the persistence of this issue, you could be right.

Did you activate the venv before trying upgrade? $ source /srv/homeassistant/bin/activate You should have (homeassistant) or whatever you named it at the beginning of your command line once in the venv

I just wanted to say the exact same thing. It looks like it wants to install outside of the virtual environment.
Else try to make a new virtual environment and name it something like HA of homeassistant2/homeassistant-test or whatever. Try to install it there. Do not forget to activate the virtual environment first.

I did activate it, also I’ve tried completely deleting the folder and installing from scratch and same thing.

I just upgraded again. I triple checked that 1) I was running as the homeassistant user.
2) I had activated the virtual environment
3) I upgraded pip immediately before upgrading.

I get the same error, yet the upgrade is still successful in that I see the newest version of HA when I start it. Very weird.

This is still very weird.

I started afresh with a new installation on a raspberry pi 4. I still get this message when I do pip install --upgrade homeassistant.

Everything seems to work just fine. Does no one else have this happen?