当前位置: 代码迷 >> 综合 >> 树莓派 Install Home Assistant Core
  详细解决方案

树莓派 Install Home Assistant Core

热度:64   发布时间:2023-11-14 07:51:07.0

Install Home Assistant Core

安装python3.8

sudo  apt-get  update
sudo  apt-get  upgrade
sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev
wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
tar zxvf Python-3.8.0.tgz
cd Python-3.8.0
sudo ./configure
sudo make
sudo make install
————————————————
版权声明:本文为CSDN博主「binbin846」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/binbin846/article/details/103049168

安装依赖

sudo apt-get install -y python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 tzdata

创建账户

sudo useradd -rm homeassistant -G dialout,gpio,i2c

创建虚拟环境

sudo mkdir /srv/homeassistant
sudo chown homeassistant:homeassistant /srv/homeassistant

下一步是为Home Assistant Core创建并更改为虚拟环境。这将作为家庭助理帐户完成。

sudo -u homeassistant -H -s cd /srv/homeassistant python3.8 -m venv .
source bin/activate

按照命令安装所需的Python包。

python3 -m pip install wheel

一旦安装了所需的Python包,现在就可以安装Home Assistant Core了!

pip3 install homeassistant

首次启动Home Assistant Core。这将为您完成安装,自动在/home/homesassistant目录中创建.homesassistant配置目录,并安装任何基本依赖项。

hass

现在,您可以通过上的web界面访问您的安装

http://homeassistant.local:8123

访问github

sudo vi /etc/hosts151.101.72.249 github.global.ssl.fastly.net
192.30.255.112 github.com

问题

python3安装过程中出现的ssl问题 ,No module named _ssl
在这里插入图片描述

error: openssl/rsa.h: No such file or directory

apt-get install libssl-dev

pip3 install时报错“pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.”

sudo apt-get install libffi-dev

  相关解决方案