安装homeassistant+pyth
1、基础信息
- 版本信息
- Scientific Linux release 7.6 (Nitrogen)
- win10 linux 子系统,centos,wlinux
- 摸着石头过河,安装出现部分问题,再补充
-当前目录
[root@SKY-20181201MWD ~]# pwd
/root
[root@SKY-20181201MWD ~]# ls
Python-3.6.0 Python-3.6.0.tgz anaconda-ks.cfg epel-release-latest-7.noarch.rpm original-ks.cfg
[root@SKY-20181201MWD ~]#
- 扩充开发套件
- yum install openssl openssl-devel
- wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
2、编译安装python3.6
- 编辑源目录下的vim Modules/Setup.dist +209,去掉ssl注释,因为后面pip3安装home的时候会使用ssl加密协议.
207 Socket module helper for SSL support; you must comment out the other
208 socket line above, and possibly edit the SSL variable:
209 SSL=/usr/local/ssl
210 _ssl _ssl.c \
211 -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
212 -L$(SSL)/lib -lssl -lcrypto
213
- 编译安装
- ./configure --prefix=/usr/local/python3.6
- make && make install
-
把编译安装的python程序加入系统环境
-
编辑系统变量文件,添加程序路径
vim /etc/profile
在文件底部添加, export PATH=$PATH:/usr/local/python3.6/bin/
退出后保存:wq保存![profile](/file/imgs/upload/202301/31/0vlvcwzbvzs.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk) . /etc/profile --加载系统环境变量
-
3、安装homeassistant
- pip3 install homeassistant
[root@SKY-20181201MWD bin]# ./pip3 install homeassistant
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
Collecting homeassistant
Downloading https://files.pythonhosted.org/packages/1c/e2/c9ff3c6516fa040cbc2645fc7e579373f676f462329568761727c9430f12/homeassistant-0.87.0-py3-none-any.whl (3.7MB)
100% |################################| 3.7MB 222kB/s
Collecting bcrypt==3.1.5 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/31/4b/4057d0716e7170c29ff12e19791eb6037422620835e4a58a01d4790e56d1/bcrypt-3.1.5-cp34-abi3-manylinux1_x86_64.whl (55kB)
100% |################################| 61kB 4.0MB/s
Collecting cryptography==2.3.1 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/59/32/92cade62c645756a83598edf56289e9b19aae5370642a7ce690cd06bc72f/cryptography-2.3.1-cp34-abi3-manylinux1_x86_64.whl (2.1MB)
100% |################################| 2.1MB 268kB/s
Collecting async-timeout==3.0.1 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/e1/1e/5a4441be21b0726c4464f3f23c8b19628372f606755a9d2e46c187e65ec4/async_timeout-3.0.1-py3-none-any.whl
Collecting pytz>=2018.07 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl (510kB)
100% |################################| 512kB 1.4MB/s
Collecting astral==1.8 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/74/49/f79344cc99cee4816cc2b22d04d8bc622135415a2713847620a076ef7ca3/astral-1.8-py2.py3-none-any.whl
Collecting certifi>=2018.04.16 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/certifi-2018.11.29-py2.py3-none-any.whl (154kB)
100% |################################| 163kB 4.3MB/s
Collecting requests==2.21.0 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl (57kB)
100% |################################| 61kB 2.4MB/s
Requirement already satisfied: pip>=8.0.3 in /usr/local/python3.6/lib/python3.6/site-packages (from homeassistant)
Collecting aiohttp==3.5.4 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/0d/5c/f87987f4dc8b2cfcf37c83a814ea4b2aff4d285cbffc0ab08b2b4fa3f584/aiohttp-3.5.4-cp36-cp36m-manylinux1_x86_64.whl (1.2MB)
100% |################################| 1.2MB 80kB/s
Collecting voluptuous==0.11.5 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/59/95/fa6218477c6999c9b7fdfab7c12c1bd4da2d5930f5eb2b232ec74eb344e7/voluptuous-0.11.5-py2.py3-none-any.whl
Collecting ruamel.yaml==0.15.85 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/01/f3/4547d90e0ece2c9e42f9c59bda62123b2410901039d19e35fc23db35fc1c/ruamel.yaml-0.15.85-cp36-cp36m-manylinux1_x86_64.whl (663kB)
100% |################################| 665kB 149kB/s
Collecting python-slugify==1.2.6 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/00/ad/c778a6df614b6217c30fe80045b365bfa08b5dd3cb02e8b37a6d25126781/python-slugify-1.2.6.tar.gz
Collecting voluptuous-serialize==2.0.0 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/66/fd/c3e522ce5645686b9712d230e3599fca12bdf5f76b8176da26d19c3852db/voluptuous-serialize-2.0.0.tar.gz
Collecting PyJWT==1.6.4 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/93/d1/3378cc8184a6524dc92993090ee8b4c03847c567e298305d6cf86987e005/PyJWT-1.6.4-py2.py3-none-any.whl
Collecting attrs==18.2.0 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/3a/e1/5f9023cc983f1a628a8c2fd051ad19e76ff7b142a0faf329336f9a62a514/attrs-18.2.0-py2.py3-none-any.whl
Collecting pyyaml<4,>=3.13 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz (270kB)
100% |################################| 276kB 2.8MB/s
Collecting jinja2>=2.10 (from homeassistant)
Downloading https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl (126kB)
100% |################################| 133kB 4.8MB/s
Collecting cffi>=1.1 (from bcrypt==3.1.5->homeassistant)
Downloading https://files.pythonhosted.org/packages/6d/c0/47db8f624f3e4e2f3f27be03a93379d1ba16a1450a7b1aacfa0366e2c0dd/cffi-1.11.5-cp36-cp36m-manylinux1_x86_64.whl (421kB)
100% |################################| 430kB 88kB/s
Collecting six>=1.4.1 (from bcrypt==3.1.5->homeassistant)
Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting idna>=2.1 (from cryptography==2.3.1->homeassistant)
Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
100% |################################| 61kB 4.5MB/s
Collecting asn1crypto>=0.21.0 (from cryptography==2.3.1->homeassistant)
Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
100% |################################| 102kB 4.6MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests==2.21.0->homeassistant)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |################################| 143kB 3.9MB/s
Collecting urllib3<1.25,>=1.21.1 (from requests==2.21.0->homeassistant)
Downloading https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl (118kB)
100% |################################| 122kB 5.1MB/s
Collecting idna-ssl>=1.0; python_version < "3.7" (from aiohttp==3.5.4->homeassistant)
Downloading https://files.pythonhosted.org/packages/46/03/07c4894aae38b0de52b52586b24bf189bb83e4ddabfe2e2c8f2419eec6f4/idna-ssl-1.1.0.tar.gz
Collecting multidict<5.0,>=4.0 (from aiohttp==3.5.4->homeassistant)
Downloading https://files.pythonhosted.org/packages/71/cc/ceb5b8c76e7a23212b9e0353053cc35a9d86c763d852a76d9b941fe81fbc/multidict-4.5.2-cp36-cp36m-manylinux1_x86_64.whl (309kB)
100% |################################| 317kB 452kB/s
Collecting yarl<2.0,>=1.0 (from aiohttp==3.5.4->homeassistant)
Downloading https://files.pythonhosted.org/packages/fa/c0/9a73968a9f4e4dac8dffb0ba35f932dd7798fe97901f4942c2d38667862c/yarl-1.3.0-cp36-cp36m-manylinux1_x86_64.whl (251kB)
100% |################################| 256kB 3.0MB/s
Collecting typing-extensions>=3.6.5; python_version < "3.7" (from aiohttp==3.5.4->homeassistant)
Downloading https://files.pythonhosted.org/packages/0f/62/c66e553258c37c33f9939abb2dd8d2481803d860ff68e635466f12aa7efa/typing_extensions-3.7.2-py3-none-any.whl
Collecting Unidecode>=0.04.16 (from python-slugify==1.2.6->homeassistant)
Downloading https://files.pythonhosted.org/packages/31/39/53096f9217b057cb049fe872b7fc7ce799a1a89b76cf917d9639e7a558b5/Unidecode-1.0.23-py2.py3-none-any.whl (237kB)
100% |################################| 245kB 256kB/s
Collecting MarkupSafe>=0.23 (from jinja2>=2.10->homeassistant)
Downloading https://files.pythonhosted.org/packages/08/04/f2191b50fb7f0712f03f064b71d8b4605190f2178ba02e975a87f7b89a0d/MarkupSafe-1.1.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pycparser (from cffi>=1.1->bcrypt==3.1.5->homeassistant)
Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)
100% |################################| 163kB 3.4MB/s
Installing collected packages: pycparser, cffi, six, bcrypt, idna, asn1crypto, cryptography, async-timeout, pytz, astral, certifi, chardet, urllib3, requests, idna-ssl, multidict, yarl, attrs, typing-extensions, aiohttp, voluptuous, ruamel.yaml, Unidecode, python-slugify, voluptuous-serialize, PyJWT, pyyaml, MarkupSafe, jinja2, homeassistant
Running setup.py install for pycparser ... done
Running setup.py install for idna-ssl ... done
Running setup.py install for python-slugify ... done
Running setup.py install for voluptuous-serialize ... done
Running setup.py install for pyyaml ... done
Successfully installed MarkupSafe-1.1.0 PyJWT-1.6.4 Unidecode-1.0.23 aiohttp-3.5.4 asn1crypto-0.24.0 astral-1.8 async-timeout-3.0.1 attrs-18.2.0 bcrypt-3.1.5 certifi-2018.11.29 cffi-1.11.5 chardet-3.0.4 cryptography-2.3.1 homeassistant-0.87.0 idna-2.8 idna-ssl-1.1.0 jinja2-2.10 multidict-4.5.2 pycparser-2.19 python-slugify-1.2.6 pytz-2018.9 pyyaml-3.13 requests-2.21.0 ruamel.yaml-0.15.85 six-1.12.0 typing-extensions-3.7.2 urllib3-1.24.1 voluptuous-0.11.5 voluptuous-serialize-2.0.0 yarl-1.3.0
You are using pip version 9.0.1, however version 19.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
4、启动homeassistant,
- 运行hass
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341