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

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

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

  [复制链接]

0

主题

30

帖子

106

积分

注册会员

Rank: 2

积分
106
金钱
76
HASS币
0
发表于 2018-3-14 23:51:19 | 显示全部楼层
本帖最后由 jackwang99 于 2018-3-14 23:55 编辑
MAPGPS 发表于 2018-3-14 17:42
1. 你都进Linux系统了,当然安装成功了。
2. 请检查一下1.2步里的“源地址”是否正确。
...

谢谢回复。
Python is 3.5.1没有成功升到3.5.3以上,我在哪个环节错了?问题出在哪里?

android@localhost:~$ sudo pip3 install -U pip
The directory'/home/android/.cache/pip/http' or its parent directory is not owned by thecurrent user and the cache has been disabled. Please check the permissions andowner of that directory. If executing pip with sudo, you may want sudo's -Hflag.
The directory '/home/android/.cache/pip' orits parent directory is not owned by the current user and caching wheels hasbeen disabled. check the permissions and owner of that directory. If executingpip with sudo, you may want sudo's -H flag.
Collecting pip
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
   100% |################################| 1.3MB 239kB/s
Installing collected packages: pip
Found existing installation: pip 8.1.1
   Not uninstalling pip at /usr/lib/python3/dist-packages, outsideenvironment /usr
Successfully installed pip-9.0.1
android@localhost:~$ pip3 install -U pip
Requirement already up-to-date: pip in/usr/local/lib/python3.5/dist-packages
android@localhost:~$ pip3 install virtualenv
Collecting virtualenv
Downloading virtualenv-15.1.0-py2.py3-none-any.whl (1.8MB)
   100% |################################| 1.8MB 193kB/s
Installing collected packages: virtualenv
Exception:
Traceback (most recent call last):
File"/usr/local/lib/python3.5/dist-packages/pip/basecommand.py", line215, in main
   status = self.run(options, args)
File "/usr/local/lib/python3.5/dist-packages/pip/commands/install.py",line 342, in run
   prefix=options.prefix_path,
File"/usr/local/lib/python3.5/dist-packages/pip/req/req_set.py", line784, in install
   **kwargs
File "/usr/local/lib/python3.5/dist-packages/pip/req/req_install.py",line 851, in install
   self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File"/usr/local/lib/python3.5/dist-packages/pip/req/req_install.py", line1064, in move_wheel_files
   isolated=self.isolated,
File "/usr/local/lib/python3.5/dist-packages/pip/wheel.py",line 345, in move_wheel_files
   clobber(source, lib_dir, True)
File "/usr/local/lib/python3.5/dist-packages/pip/wheel.py",line 323, in clobber
   shutil.copyfile(srcfile, destfile)
File "/usr/lib/python3.5/shutil.py", line 115, in copyfile
   with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permissiondenied: '/usr/local/lib/python3.5/dist-packages/virtualenv.py'
android@localhost:~$ sudo pip3 install virtualenv
The directory'/home/android/.cache/pip/http' or its parent directory is not owned by thecurrent user and the cache has been disabled. Please check the permissions andowner of that directory. If executing pip with sudo, you may want sudo's -Hflag.
The directory '/home/android/.cache/pip' orits parent directory is not owned by the current user and caching wheels hasbeen disabled. check the permissions and owner of that directory. If executingpip with sudo, you may want sudo's -H flag.
Collecting virtualenv
  Downloadingvirtualenv-15.1.0-py2.py3-none-any.whl (1.8MB)
   100% |################################| 1.8MB 184kB/s
Installing collected packages: virtualenv
Successfully installed virtualenv-15.1.0
android@localhost:~$ python3 -V
Python 3.5.1+
android@localhost:~$ sudo useradd -rm homeassistant
android@localhost:~$ sudo mkdir /srv/homeassistant
android@localhost:~$ sudo chown homeassistant:homeassistant/srv/homeassistant
android@localhost:~$ sudo mkdir /home/homeassistant/.pip
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
Also creating executable in/srv/homeassistant/bin/python
Installing setuptools, pip, wheel...done.
homeassistant@localhost:/home/android$ source/srv/homeassistant/bin/activate
(homeassistant) homeassistant@localhost:/home/android$pip3 install -U homeassistant
Collecting homeassistant
Downloading homeassistant-0.65.4-py2.py3-none-any.whl (7.8MB)
   100% |################################| 7.8MB 42kB/s
homeassistant requiresPython '>=3.5.3' but the running Python is 3.5.1
回复

使用道具 举报

3

主题

159

帖子

587

积分

高级会员

Rank: 4

积分
587
金钱
428
HASS币
0
发表于 2018-3-15 00:45:34 | 显示全部楼层
本帖最后由 MAPGPS 于 2018-3-18 00:45 编辑
jackwang99 发表于 2018-3-14 23:51
谢谢回复。Python is 3.5.1没有成功升到3.5.3以上,我在哪个环节错了?问题出在哪里?
android@localhost: ...

请看下面贴子。
回复

使用道具 举报

3

主题

159

帖子

587

积分

高级会员

Rank: 4

积分
587
金钱
428
HASS币
0
发表于 2018-3-15 07:06:47 来自手机 | 显示全部楼层
本帖最后由 MAPGPS 于 2018-3-15 07:16 编辑

你现在是新安装HomeAssistant,默认是安装最新版本,即0.65.4。
查看HA版本历史,自0.65开始就要求用Python3.5.3,而系统里是3.5.1。
为避免升级Python麻烦,你可以指定安装上周出的0.64.3(我上周升级的是这个版本):
pip3 install homeassistant==0.64.3
回复

使用道具 举报

2

主题

93

帖子

393

积分

中级会员

Rank: 3Rank: 3

积分
393
金钱
300
HASS币
0
发表于 2018-3-15 07:24:20 | 显示全部楼层
学习参考
回复

使用道具 举报

0

主题

76

帖子

766

积分

禁止访问

积分
766
金钱
690
HASS币
0
发表于 2018-3-15 08:48:51 | 显示全部楼层
先顶一下
回复

使用道具 举报

0

主题

17

帖子

164

积分

注册会员

Rank: 2

积分
164
金钱
147
HASS币
0
发表于 2018-3-15 20:10:32 | 显示全部楼层
一直搞不定 繼續試
回复

使用道具 举报

13

主题

289

帖子

1968

积分

金牌会员

Rank: 6Rank: 6

积分
1968
金钱
1679
HASS币
0
发表于 2018-3-16 16:56:00 | 显示全部楼层
27hh 发表于 2017-8-28 01:50
2. 部署系统

2.1 连接

输入 sudo 时 报错
lixm@localhost:~$ sudo passwd lixm
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
lixm@localhost:~$ passwd lixm
Changing password for lixm.
(current) UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged
回复

使用道具 举报

3

主题

82

帖子

659

积分

论坛技术达人

积分
659
金钱
577
HASS币
0
发表于 2018-3-16 17:13:21 | 显示全部楼层
闲置安卓手机安装HA变身智能家居中枢,及网关接入教程
回复

使用道具 举报

1

主题

27

帖子

85

积分

注册会员

Rank: 2

积分
85
金钱
58
HASS币
0
发表于 2018-3-16 22:58:51 | 显示全部楼层
我在安装 homeassistant 的时候也遇到了版本问题的报错,请问各位大侠我在截图界面该如何往下操作
QQ截图20180316224626.jpg
回复

使用道具 举报

3

主题

159

帖子

587

积分

高级会员

Rank: 4

积分
587
金钱
428
HASS币
0
发表于 2018-3-17 00:51:27 | 显示全部楼层
polofun 发表于 2018-3-16 22:58
我在安装 homeassistant 的时候也遇到了版本问题的报错,请问各位大侠我在截图界面该如何往下操作 ...

参见 266 和 267楼:
https://bbs.hassbian.com/forum.p ... d=993&pid=67008
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-6-30 14:35 , Processed in 0.109597 second(s), 33 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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