『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: 27hh

[进阶教程] 闲置安卓手机安装HA变身智能家居中枢,及网关接入教程

  [复制链接]

32

主题

986

帖子

4233

积分

论坛元老

Rank: 8Rank: 8

积分
4233
金钱
3207
HASS币
110

教程狂人论坛风云人物

 楼主| 发表于 2018-3-13 00:52:22 来自手机 | 显示全部楼层
jackwang99 发表于 2018-3-13 00:20
楼主辛苦,小白提问,请教大家:
在2.2.1各种小准备环节,执行更新pip命令,出现黄色提示,如何解决?


好像是不用理会,看看后面没错误就行。
回复

使用道具 举报

0

主题

5

帖子

28

积分

新手上路

Rank: 1

积分
28
金钱
23
HASS币
0
发表于 2018-3-13 11:56:08 | 显示全部楼层
不错,这样就可以把旧手机利用起来了
回复

使用道具 举报

0

主题

30

帖子

106

积分

注册会员

Rank: 2

积分
106
金钱
76
HASS币
0
发表于 2018-3-13 12:42:55 | 显示全部楼层
27hh 发表于 2018-3-13 00:52
好像是不用理会,看看后面没错误就行。

谢谢楼主答复。

如果不理会,“安装 homeassistant 环节,执行 pip3 install -U homeassistant 时,提示Python3 版本低。
回复

使用道具 举报

3

主题

159

帖子

587

积分

高级会员

Rank: 4

积分
587
金钱
428
HASS币
0
发表于 2018-3-13 13:42:28 来自手机 | 显示全部楼层
jackwang99 发表于 2018-3-13 12:42
谢谢楼主答复。

如果不理会,“安装 homeassistant 环节,执行 pip3 install -U homeassistant 时,提示 ...

$HOME环境变量问题。请用 -H 参数:
sudo -H pip3 install -U pip
回复

使用道具 举报

6

主题

265

帖子

1497

积分

金牌会员

Rank: 6Rank: 6

积分
1497
金钱
1232
HASS币
0
发表于 2018-3-13 18:54:13 | 显示全部楼层
谢谢分享
回复

使用道具 举报

0

主题

30

帖子

106

积分

注册会员

Rank: 2

积分
106
金钱
76
HASS币
0
发表于 2018-3-13 21:22:33 | 显示全部楼层
1、按照教程,多次尝试。执行到最后,应该有错误。请教错在哪里?
2、请教各位,我是linux小白,多多指点。


* Documentation:  https://help.ubuntu.com/
Ubuntu 16.04 LTS [running via Linux Deploy]
Last login: Tue Mar 13 12:37:51 2018 from 192.168.21.101
android@localhost:~$ sudo apt-get install nano
Reading package lists... Done
Building dependency tree      
Reading state information... Done
nano is already the newest version (2.5.3-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
android@localhost:~$ sudo apt-get install -y python3-pip
Reading package lists... Done
Building dependency tree      
Reading state information... Done
python3-pip is already the newest version (8.1.1-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
android@localhost:~$ sudo mkdir /root/.pip
mkdir: cannot create directory '/root/.pip': File exists
android@localhost:~$ sudo sh -c "echo '[global]\nindex-url = http://mirrors.ustc.edu.cn/pypi/web/simple/' > /root/.pip/pip.conf"
android@localhost:~$ sudo pip3 install -U pip
The directory '/home/android/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/android/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: pip in /usr/local/lib/python3.5/dist-packages
android@localhost:~$ sudo -H pip install -U pip
The repository located at mirrors.ustc.edu.cn is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host mirrors.ustc.edu.cn'.
Requirement already up-to-date: pip in /usr/local/lib/python3.5/dist-packages
android@localhost:~$ sudo -H pip install -U pip --trusted-host mirrors.ustc.edu.cn
Requirement already up-to-date: pip in /usr/local/lib/python3.5/dist-packages
android@localhost:~$ sudo pip3 install virtualenv
The directory '/home/android/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/android/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: virtualenv in /usr/local/lib/python3.5/dist-packages
android@localhost:~$ sudo -H pip3 install virtualenv
Requirement already satisfied: virtualenv in /usr/local/lib/python3.5/dist-packages
android@localhost:~$ sudo useradd -rm homeassistant
useradd: user 'homeassistant' already exists
android@localhost:~$ sudo chown homeassistant:homeassistant /srv/homeassistant
android@localhost:~$ sudo mkdir /home/homeassistant/.pip
mkdir: cannot create directory '/home/homeassistant/.pip': File exists
android@localhost:~$ sudo sh -c "echo '[global]nindex-url = https://mirrors.ustc.edu.cn/pypi/web/simple/' > /home/homeassistant/.pip/pip.conf"
android@localhost:~$ sudo chown -R homeassistant:homeassistant /home/homeassistant/.pip
android@localhost:~$ sudo su -s /bin/bash homeassistant
homeassistant@localhost:/home/android$ virtualenv -p python3 /srv/homeassistant
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /srv/homeassistant/bin/python3
Not overwriting existing python script /srv/homeassistant/bin/python (you must use /srv/homeassistant/bin/python3)
Installing setuptools, pip, wheel...done.


回复

使用道具 举报

0

主题

30

帖子

106

积分

注册会员

Rank: 2

积分
106
金钱
76
HASS币
0
发表于 2018-3-13 21:23:37 | 显示全部楼层
MAPGPS 发表于 2018-3-13 13:42
$HOME环境变量问题。请用 -H 参数:
sudo -H pip3 install -U pip

麻烦高手,指点一下。谢谢
回复

使用道具 举报

3

主题

159

帖子

587

积分

高级会员

Rank: 4

积分
587
金钱
428
HASS币
0
发表于 2018-3-13 23:08:46 | 显示全部楼层
jackwang99 发表于 2018-3-13 21:22
1、按照教程,多次尝试。执行到最后,应该有错误。请教错在哪里?
2、请教各位,我是linux小白,多多指点。 ...

你那里头有两套python3了,如果都是新的话倒也没关系。
接着往下,继续安装吧!
回复

使用道具 举报

1

主题

27

帖子

85

积分

注册会员

Rank: 2

积分
85
金钱
58
HASS币
0
发表于 2018-3-13 23:55:53 | 显示全部楼层
楼主能否在后面抄代码的地方截下每一步安装成功的图,我都不知道哪里出了问题
回复

使用道具 举报

0

主题

11

帖子

86

积分

注册会员

Rank: 2

积分
86
金钱
75
HASS币
0
发表于 2018-3-14 00:09:08 | 显示全部楼层
谢谢分享,小白来学习了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2025-1-7 05:11 , Processed in 0.334590 second(s), 31 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表