I chose the manual install (new at raspberry and HA, and don’t want and have a flash card)
So I follow the manual installation. But i failed at the “python3 -m venv .” step
here is the message : “Error: Command ‘[’/srv/homeassistant/bin/python3’, ‘-Im’, ‘ensurepip’, ‘–upgrade’, ‘–default-pip’]’ returned non-zero exit status 2.”
Please note It is the second time I tried to install HA. First time fail, so I delete /srv and / home home assistant directory.
Maybe something was not make properly ?
I should restart again, but how to “clean” uninstall or purge?
Please describe the system that you’re using: which Raspberry Pi, and what operating system does it have on it already? What do you mean by “and don’t want and have a flash card”?
Are you planning for Home Assistant to be the only thing running on the Pi?
-Yes I use this guide
-Raspberry 3
-Note sure, but it’s Raspbian
-I plan to use the raspberry for HA and to be a player for casting music
I only have the SD card given at the purchase, but I don’t know if the operating system run on it (I very new to Raspberry and Linux).
So when I saw, you have to flash a SD card for installing HA, I thought I should not flash this car, so I preferred use the manual install. In deed, it could be a could way to learn and understand “linux” command line
That suggests that the python3 interpreter is already the one in the virtualenv, which shouldn’t be created until after this step. Are you sure that 1. you completely deleted the /srv/homeassistant/ folder after your first attempt and 2. you’re following the guide in the correct order?
When I tried again an install, I manually delete /srv/homeassistant and /home/homeassistant folders (with rm, because of permission problem)
Yes, I follow step by step. But At the second time, some step are already “done” : for example, I don’t have to create homeassistant user (already exist by my first attempt)
Here is the output of the command :
pi@raspberrypi:~ $ which python3
/usr/local/bin/python3
Yes. You could format that Noobs SD card to clean it off completely or if you want to keep the Noobs partitions intact use a different SD card. There’s no doubt that the Noobs card in its current condition is causing your HA installation issues.
No offense, but if you are new to HA and linux, I’d strongly advise to NOT use the manual install in a venv and rather use the image or install HA supervised on Raspbian lite. With a venv you need to maintain the system yourself, upgrade python version from time to time, check and fix depencies once in a while, etc., which is not extrwmly hard but can get frustrating for a beginner very fast (I was there). Also with a venv you don’t get all the fancy add-ons, built-in backup function, automatic updates etc., which are all very handy, especially for a beginner.
I started HA with the venv three years ago and still working away nicely.
There’s pros and cons for each install method and like the OP I came across the venv install purely by accident and haven’t looked back.
There’s plenty of experienced users on the forum who will only be too happy to point him in the right direction and if he finds in time this setup is not for him he’s lost nothing and probably learnt a little on the journey.
The main thing is he’s resolved his installation issue and is up and running with HA.
I also started with a venv at around the same time and switched to core in docker later.
That’s generqlly true, but you can expect way more help with other install methods as venv is probably the least used method (I know development is done with the venv method, but to be honest I don’t see a lot of core devs who are very actively providing support in the forums).
I just wanted to save OP some time, because he will for sure need a lot more time to learn HA with a venv than with a supervised install, especially without prior knowledge of linux or HA. Also I’m not sure whether OP is aware that there are no add-ons for venv and that he needs to setup things himself to get the same functionality. I don’t want to say venv is a bad method or anything like that, but it’s for sure not the most user friendly method.
Yes there’s no one size fits all with HA. I’m glad I went the venv route. One thing is for sure. It’s still here as an installation method.
All I did was address the OP’s issue. I generally don’t recommend one preference over another unless I’m asked to. Had the subject been “which is the easiest way to get started with HA”…well that would have possibly been a different answer.
Maybe the OP will be back soon asking the very same question…who knows.
Thank you for sharing your knowledge. It always be useful
Juste few questions
-The default install, is to flash a SD card with HA, and install the image.
Since the OS Raspbian is store on the SD card (I suppose), what does imply to do the default install (retire OS card, and puting “HA” image install) ?
Is that mean my pi dedicated only ta HA and nothing else ?
That’s the reason why I choose venv, because I don’t find explanation to these questions
By using verV, So if I want to install add on, it can be to hard ?
The docker way use to be an another option I looked. But I’m not sure to well understand.
I come from industrial automation, dockers, Mqtt start to be use. I don’t know for the us, but in Europe, industry field technology is moving very slowly (There is less than 10 years, web server was a discover for some industrial !).
So I discover step by step (because evolution should not be fear) , And maybe I’m on a bad way for HA. But I will learn from my mistakes.
Wow you were back a bit quicker than I anticipated
In the Venv you add platforms. A quick Google will show you exactly how many are available. Here’s a link to a demo you can add to your config yaml to see how they work https://www.home-assistant.io/integrations/demo/
Yes you can still use your SD card for other tasks as well as HA in the Venv setup.
Your best friend here is the community forum as well as Google. The resources are vast. As you come from a technical background I doubt the Venv will faze you one bit, but you need to search and don’t be afraid to ask questions