> 2017-12-25 21:23:37 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package python-miio==0.3.0: Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3cnd2omo/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-wi7mu27a-record/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-3cnd2omo/cryptography/
> 2017-12-25 21:23:37 ERROR (MainThread) [homeassistant.setup] Not initializing switch.chuangmi_ir because could not install dependency python-miio==0.3.0
> 2017-12-25 21:23:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform switch.chuangmi_ir: Could not install all requirements.
i tried to install all of the tools one by one but i get this error:
Could not find a version that satisfies the requirement changmi_ir.py (from versions: )
No matching distribution found for changmi_ir.py
what am i missing? anyone know how i could solve this? im useing hassio 0.60 and windows 10
I think it’s caused by requirement … Actual python-miio = 0.3.2 or even 0.3.3 u might want to change this in REQUIREMENTS = [‘python-miio==0.3.0’] . make a “pip3 list” in your has env and watch your python-miio version. But I dunno if this would break the component .
Okay, I got the exact same thing, so let’s figure this out together. I’m also quite a noob, I had a Unix starter course some 15 years ago, and I have only occasionally used it with Telnetting stuff.
I’m running 0.59.2 on a DietPi OS on a Pine64 machine. Hass runs in a virtual environment, which I setup using the guides provided.
These are my errors :
2017-12-27 22:06:59 ERROR (Thread-4) [homeassistant.util.package] Unable to install package python-miio==0.3.0: Command "/srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mhkd8lkv/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-u6sq4294-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.4/cffi" failed with error code 1 in /tmp/pip-build-mhkd8lkv/cffi/
2017-12-27 22:06:59 ERROR (MainThread) [homeassistant.setup] Not initializing switch.chuangmi_ir because could not install dependency python-miio==0.3.0
2017-12-27 22:06:59 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform switch.chuangmi_ir: Could not install all requirements.
I am guessing, since the 1st error complains about not being able to install miio, that it has first checked if miio is already installed. Since it apparently wasn’t , it tries to install it. Else miio would need to be installed everytime the Home Assistant restarts, which makes no sense to me, as it would be a lot of overhead.
So, based on this assumption, I guess we need to figure out how to install miio in our environments ?
Okay, so I found this post describing a similar problem :
And a solution :
So, when logged into telnet from root I gave the first command
su - homeassistant
This gave me a $=sign prompt
Then I did
$ source /srv/homeassistant/bin/activate
but that gave an error :
-su: 1: source: not found
but I continued with
$ pip3 install -U setuptools
Downloading/unpacking setuptools from https://pypi.python.org/packages/4c/00/19a d1da0869e6699577d90ea843325036952015f924fc8488d181c140729/setuptools-38.2.5-py2. py3-none-any.whl#md5=f901fdbfffaa488aa93afd860235b15a
Downloading setuptools-38.2.5-py2.py3-none-any.whl (489kB): 489kB downloaded
Installing collected packages: setuptools
Found existing installation: setuptools 5.5.1
Not uninstalling setuptools at /usr/lib/python3/dist-packages, owned by OS
Can’t roll back setuptools; was not uninstalled
Cleaning up…
Exception:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/pip/basecommand.py”, line 122, in main
status = self.run(options, args)
File “/usr/lib/python3/dist-packages/pip/commands/install.py”, line 295, in ru n
requirement_set.install(install_options, global_options, root=options.root_p ath)
File “/usr/lib/python3/dist-packages/pip/req.py”, line 1436, in install
requirement.install(install_options, global_options, *args, **kwargs)
File “/usr/lib/python3/dist-packages/pip/req.py”, line 672, in install
self.move_wheel_files(self.source_dir, root=root)
File “/usr/lib/python3/dist-packages/pip/req.py”, line 902, in move_wheel_file s
pycompile=self.pycompile,
File “/usr/lib/python3/dist-packages/pip/wheel.py”, line 214, in move_wheel_fi les
clobber(source, lib_dir, True)
File “/usr/lib/python3/dist-packages/pip/wheel.py”, line 208, in clobber
shutil.copy2(srcfile, destfile)
File “/usr/lib/python3.4/shutil.py”, line 244, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File “/usr/lib/python3.4/shutil.py”, line 108, in copyfile
with open(dst, ‘wb’) as fdst:
PermissionError: [Errno 13] Permission denied: ‘/usr/local/lib/python3.4/dist-pa ckages/easy_install.py’
Storing debug log for failure in /home/homeassistant/.pip/pip.log
So , seems to do something, although with some errors.
I continued with:
Cleaning up…
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-qbfbequ2/cryptography
Storing debug log for failure in /home/homeassistant/.pip/pip.log
So, I noticed it tried to install miio 0.3.3 and not 0.3.0
Then I did a “pip3 list” to see what was there, I expected to see the miio, but it wasn’t there.
So I continued to adjust the “chuangmi_ir.py” miio version to 0.3.3, cause in my mind that made sense. Then restarted the homeassistant. Waited…
And BOOOOM… same error…
I have a feeling I am on the right track, but a nudge would be nice.
Please wait a few days. The dependency chain (HA → python-miio → construct) of HA 0.60 combines incompatible libraries. The fix will be part of the next release. Please cp.
okay, I did some more fiddling, as I thought the error must be because I was not in the vitual environment when manually installing miio.
So I did the following :
telnet into hass and login as root
cd … (as I do not login to the root directory it seems, and therefor does not recognize the /srv/homeassistant path later on)