广告
返回顶部
首页 > 资讯 > 后端开发 > Python >安装homeassistant+pyth
  • 797
分享到

安装homeassistant+pyth

homeassistantpyth 2023-01-31 02:01:26 797人浏览 安东尼

Python 官方文档:入门教程 => 点击学习

摘要

1、基础信息 - 版本信息 - Scientific linux release 7.6 (Nitrogen) - win10 linux 子系统,Centos,wlinux -

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

  1. 编辑源目录下的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


  1. 编译安装
    • ./configure --prefix=/usr/local/python3.6
    • make && make install
  2. 把编译安装的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

--结束END--

本文标题: 安装homeassistant+pyth

本文链接: https://www.lsjlt.com/news/186566.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • 安装homeassistant+pyth
    1、基础信息 - 版本信息 - Scientific Linux release 7.6 (Nitrogen) - win10 linux 子系统,centos,wlinux - ...
    99+
    2023-01-31
    homeassistant pyth
  • 【Python】安装MySQL-pyth
    // wget[root@wode006 tools]# wget https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.5.zip--2015-07...
    99+
    2023-01-31
    Python MySQL pyth
  • Intellij IDEA 安装Pyth
          百度网盘地址:https://pan.baidu.com/s/1d9ArRH6adhDUGiJvRqnZMw                 (1)建议手动安装插件   IDEA Pyhton插件地址:http://pl...
    99+
    2023-01-31
    Intellij IDEA Pyth
  • python 安装 mysql-pyth
    安装pip install MySQL-python 故障解决!   running build_ext     building '_mysql' extension     error: Microsoft Visual C++ 9.0...
    99+
    2023-01-31
    python mysql pyth
  • ubuntu 16.04 安装 pyth
    原文是环境:ubuntu14.04, python2.7本地环境:ubuntu16.04, python2.7转自 http://blog.csdn.net/heybob/article/details/52922645 =========...
    99+
    2023-01-31
    ubuntu pyth
  • centos 7 yum 安装 pyth
    sudo yum install epel-releasesudo yum install python34...
    99+
    2023-01-31
    centos yum pyth
  • Linux 下安装 pyenv(Pyth
    安装依赖yum -y install gcc gcc-c++ make git patch openssl-devel \zlib-devel readline-devel sqlite-devel bzip2-devel自动安装工具cur...
    99+
    2023-01-31
    Linux pyenv Pyth
  • Linux安装Python3与Pyth
    linux自带了Python2而且这个Python2不能被删除,因为有很多系统命令,比如yum都要用到。 输入python命令,查看可以得知是Python2.7.5版本 [root@GuangBo ~]# python Python 2....
    99+
    2023-01-31
    Linux Pyth
  • LINUX CENTOS7下安装PYTH
    1.查看是否已经安装Python Centos7默认安装了python2.7.5 因为一些命令要用它比如yum 它使用的是python2.7.5。 使用yum install openssl-devel;安装环境 使用python...
    99+
    2023-01-31
    LINUX PYTH
  • Ubuntu下安装opencv与pyth
    首先先去opencv官网(http://opencv.org/downloads.html)下载linux版本的opencv压缩包,此处下载的opencv3.1版本的。 进入opencv下载的文件夹,解压 unzip opencv...
    99+
    2023-01-31
    Ubuntu opencv pyth
  • Win10下安装Python3和Pyth
    1.下载3.65 2.7.15安装文件 Python 2.7.152.安装文件安装时选择all user 所有用户 与 开发环境3.让Python3.6.5和Python2.7.5同时运行一.修改执行文件Python 3.6.5 作为当前...
    99+
    2023-01-31
    Pyth
  • windows 10 64位安装Pyth
    1、下载Python3.6 windows版本的安装包    Python官网地址:https://www.python.org     下载软件包:python-3.6.4.exe    2、安装Python3.6版本,右击软件,以管理员...
    99+
    2023-01-31
    windows Pyth
  • 【Python】SNMP的安装及Pyth
    本文是介绍SNMP在Windows和Linux(Ubuntu)下的安装,以及通过Python调用其接口的文章。 Python 3.5.1 Windows 10 64位,Ubuntu 16.04 64位(虚拟机) SNMP...
    99+
    2023-01-31
    Python SNMP Pyth
  • win7 64位安装mysql-pyth
    ###今天测试个小程序在win7 64位系统下需要安装一下MySQL-python,参考了一下其他博客,发现都不行,最后用以下方法成功了,写一下留作笔记。1、前提是Python2.7和mysql5.7已经都安装成功。2、发现了这个网站:ht...
    99+
    2023-01-31
    pyth mysql
  • pyenv 安装(管理多个版本pyth
       安装后可以方便的切换python版本1,运行升级库     yum install -y gcc make patch gdbm-devel openssl-devel sqlite-devel zlib-devel bzip2-de...
    99+
    2023-01-31
    多个 版本 pyenv
  • Mac 删除/卸载 自己安装的 Pyth
    官网pkg安装的python版本 第一步:删除框架 sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.71 第二步:删除应用目录 sudo rm -rf "/App...
    99+
    2023-01-31
    Mac Pyth
  • mac上通过brew包管理器安装pyth
    ...
    99+
    2023-01-31
    管理器 mac brew
  • 详述 Mac 系统下安装及卸载 Pyth
    博主说:对于 Mac 而言,其自带的 Python 2.6 和 Python 2.7 这两个版本已经能够满足我们的大部分需求了,因此除非对某个版本有强烈需求,否则不建议自己安装 Python,因为这是典型的安装容易,删除麻烦。 ...
    99+
    2023-01-31
    系统 Mac Pyth
  • 【教程】安卓设备使用AidLux部署高版本HomeAssistant(2023.2及以上)及安装HACS
    本文发布于:2023年7月1日 备注:Python3.11装起来问题比较多不建议使用 1. 首先安装AidLux,这一步省略 2. 从源码编译Python3.10(HomeAssistant 2023.7需要Python3.11)    ...
    99+
    2023-09-01
    python linux 开发语言
  • 【conda安装】mamba安装 ==conda安装记录
    官方文档 、github地址 mamba文档 mamba安装教程 Mamba 是一个快速、强大且跨平台的包管理器。 它运行在 Windows、OS X 和 Linux(包括 ARM64 和 PPC64...
    99+
    2023-09-03
    conda linux python
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作