rytilahti / python-miio

Python library & console tool for controlling Xiaomi smart appliances
https://python-miio.readthedocs.io
GNU General Public License v3.0
3.68k stars 552 forks source link

Pi3 b python error #588

Closed dajojonl closed 4 years ago

dajojonl commented 4 years ago

Installed python (3.4.2) on pi3 b (octopi build) and installed miio but when i run mirobo it says required python 3.5 So i uninstalled miio and upgrade to python3.6.5 and then tried installing miio again , it complains it need python 3.4.2 to install .. what am i missing ? 20191204_221514

rytilahti commented 4 years ago

Looks like it's still using 3.4 according to the log. However, you should use virtualenv (and potentially specify to it which python version you want to use) to avoid installing packages system-wide :-)

dajojonl commented 4 years ago

Ah.. i see. Thank you. probably it is locked to it . Pi3 is running octopi only so that is replacable with backup image, not worried about that. I'll have a look at this virtual environment, any specifics for pi3 b debian or good tutorial you know about ? I have new xiaomi styj02ym and i wanted to switch to english and try some of the commands that are mentioned. I'll take the chance to brick it np.

rytilahti commented 4 years ago

I think this is a pretty good write-up on virtual environments: https://realpython.com/python-virtual-environments-a-primer/ but in the simplest case you could simply do the following:

virtualenv -p python3 venv
source venv/bin/activate
pip install python-miio # or the git url for PR, see https://stackoverflow.com/questions/13561618/pip-how-to-install-a-git-pull-request/13561621#13561621
miiocli --help