mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-27 19:26:50 +00:00
fix inconsistent virtual env location in guides (#1997)
This commit is contained in:
parent
64e6b4c424
commit
9a4e0e77e2
@ -35,7 +35,7 @@ WantedBy=multi-user.target
|
|||||||
EOF'
|
EOF'
|
||||||
```
|
```
|
||||||
|
|
||||||
If you've setup Home Assistant in `virtualenv` following our [manual installation guide](https://home-assistant.io/getting-started/installation-raspberry-pi/), the following template should work for you.
|
If you've setup Home Assistant in `virtualenv` following our [python installation guide](https://home-assistant.io/getting-started/installation-virtualenv/) or [manual installation guide for raspberry pi](https://home-assistant.io/getting-started/installation-raspberry-pi/), the following template should work for you.
|
||||||
|
|
||||||
```
|
```
|
||||||
[Unit]
|
[Unit]
|
||||||
@ -46,9 +46,9 @@ After=network.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=homeassistant
|
User=homeassistant
|
||||||
#make sure the virtualenv python binary is used
|
#make sure the virtualenv python binary is used
|
||||||
Environment=VIRTUAL_ENV="/srv/homeassistant/homeassistant_venv"
|
Environment=VIRTUAL_ENV="/srv/homeassistant"
|
||||||
Environment=PATH="$VIRTUAL_ENV/bin:$PATH"
|
Environment=PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||||
ExecStart=/srv/homeassistant/homeassistant_venv/bin/hass -c "/home/homeassistant/.homeassistant"
|
ExecStart=/srv/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant"
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -12,7 +12,7 @@ footer: true
|
|||||||
This installation of Home Assistant requires the Raspberry Pi to run [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/).
|
This installation of Home Assistant requires the Raspberry Pi to run [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/).
|
||||||
The installation will be installed in a [Virtual Environment](/getting-started/installation-virtualenv) with minimal overhead. Instructions assume this is a new installation of Raspbian Lite.
|
The installation will be installed in a [Virtual Environment](/getting-started/installation-virtualenv) with minimal overhead. Instructions assume this is a new installation of Raspbian Lite.
|
||||||
|
|
||||||
Connect to the Raspberry Pi over ssh. Default password is `raspberry`.
|
Connect to the Raspberry Pi over ssh. Default password is `raspberry`.
|
||||||
You will need to enable ssh access. The raspberry pi website has instructions [here](https://www.raspberrypi.org/documentation/remote-access/ssh/).
|
You will need to enable ssh access. The raspberry pi website has instructions [here](https://www.raspberrypi.org/documentation/remote-access/ssh/).
|
||||||
```bash
|
```bash
|
||||||
$ ssh pi@ipadress
|
$ ssh pi@ipadress
|
||||||
@ -51,17 +51,17 @@ Next up is to create and change to a virtual environment for Home Assistant. Thi
|
|||||||
```bash
|
```bash
|
||||||
$ sudo su -s /bin/bash homeassistant
|
$ sudo su -s /bin/bash homeassistant
|
||||||
$ cd /srv/homeassistant
|
$ cd /srv/homeassistant
|
||||||
$ python3 -m venv homeassistant_venv
|
$ python3 -m venv .
|
||||||
$ source /srv/homeassistant/homeassistant_venv/bin/activate
|
$ source bin/activate
|
||||||
```
|
```
|
||||||
Once you have activated the virtual environment you will notice the prompt change and then you can install Home Assistant.
|
Once you have activated the virtual environment you will notice the prompt change and then you can install Home Assistant.
|
||||||
```bash
|
```bash
|
||||||
(homeassistant_venv) homeassistant@raspberrypi:/srv/homeassistant $ pip3 install homeassistant
|
(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ pip3 install homeassistant
|
||||||
```
|
```
|
||||||
|
|
||||||
Start Home Assistant for the first time. This will complete the installation, create the `.homeasssistant` configuration directory in the `/home/homeassistant` directory and install any basic dependencies.
|
Start Home Assistant for the first time. This will complete the installation, create the `.homeasssistant` configuration directory in the `/home/homeassistant` directory and install any basic dependencies.
|
||||||
```bash
|
```bash
|
||||||
(homeassistant_venv) $ hass
|
(homeassistant) $ hass
|
||||||
```
|
```
|
||||||
|
|
||||||
You can now reach your installation on your raspberry pi over the web interface on [http://ipaddress:8123](http://ipaddress:8123).
|
You can now reach your installation on your raspberry pi over the web interface on [http://ipaddress:8123](http://ipaddress:8123).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user