
* ✅ Various markdown, spelling, and grammar fixes * ✅ Various markdown, spelling, and grammar fixes * ✅ Various markdown, spelling, and grammar fixes
2.1 KiB
layout, title, description, date, sidebar, comments, sharing, footer, redirect_from
layout | title | description | date | sidebar | comments | sharing | footer | redirect_from |
---|---|---|---|---|---|---|---|---|
page | Installation in Python virtual environment | How to install Home Assistant in a Python virtual environment. | 2016-4-16 16:40 | true | false | true | true | /getting-started/installation-virtualenv/ |
If you already have Python 3.5 or later installed, you can easily give Home Assistant a spin.
It's recommended when installing Python packages that you use a virtual environment. This will make sure that your Python installation and Home Assistant installation won't impact one another. The following steps will work on most unix like systems.
(If you're on a Debian based system, you will need to install Python virtual environment support using apt-get install python3-pip python3-venv
.)
{% linkable_title Install %}
- Create a virtual environment in your current directory:
$ python3 -m venv homeassistant
- Open the virtual environment:
$ cd homeassistant
- Activate the virtual environment:
$ source bin/activate
- Install wheel:
$ python3 -m pip install wheel
- Install Home Assistant:
$ python3 -m pip install homeassistant
- Configure it to autostart
- Or run Home Assistant manually:
$ hass --open-ui
{% linkable_title Upgrade %}
-
Stop Home Assistant
-
Open the directory where the virtual environment is located:
$ cd homeassistant
-
Activate the virtual environment:
$ source bin/activate
-
Upgrade Home Assistant:
$ python3 -m pip install --upgrade homeassistant
-
Start Home Assistant
{% linkable_title Notes %}
- In the future, if you want to start Home Assistant manually again, follow step 2, 3 and 5.
- It's recommended to run Home Assistant as a dedicated user.
Looking for more advanced guides? Check our [Rasbian guide](/docs/installation/raspberry-pi/) or the [other installation guides](/docs/installation/).