python-miio icon indicating copy to clipboard operation
python-miio copied to clipboard

After install no miiiocli available

Open ttys42 opened this issue 3 years ago • 9 comments

Describe the bug After install no miiiocli available

Version information (please complete the following information):

  • OS: Debian 10.8
  • python-miio: miiocli does not exist

To Reproduce Steps to reproduce the behavior:

  1. pip3 install python-miio

Expected behavior miiocli exists

ttys42 avatar Jun 05 '21 19:06 ttys42

The same problem, Ubuntu 20.04 on WSL2 windows. No cli tool after python installation

piotrdzz avatar Jun 09 '21 21:06 piotrdzz

ok, found a solution: just use sudo when installing sudo pip3 install python-miio

piotrdzz avatar Jun 09 '21 21:06 piotrdzz

See #951 for the windows path problems and reopen with more information if this is still a problem.

rytilahti avatar Jun 25 '21 15:06 rytilahti

I appreciate your effort but sorry: -I reported a bug for Linux and you link to an answer for Windows -You need "more information" but this issue can be replicated on any Debian installation on this planet. What kind of "more information" do you need? A video of someone dancing the problem in front of a van Gogh paining?

ttys42 avatar Jun 25 '21 15:06 ttys42

Sorry for that, I mixed the original and the WSL comment but there is still no need to be rude... To your problem:

  • You should not use pip to install packages system-wide (e.g., using su(do)), but either use pip install --user or even better, virtualenv, to contain the install.
  • If installed with --user, your ~/.local/bin/ should have the script, so if it's not working, maybe that directory is not in your $PATH?
  • If installed within a virtualenv, the script is located under the bin directory.
$ cd /tmp
$ virtualenv venv
$ . venv/activate
$ pip install python-miio
<install logs>
$ which miiocli
/tmp/venv/bin/miiocli

rytilahti avatar Jun 25 '21 22:06 rytilahti

Hello, I'm using archlinux and runing home assistant - with xiaomi_miio integration on a docker. Also the miiocli command it's not working. ( -bash: miiocli: command not found)

rotrials avatar Dec 19 '21 21:12 rotrials

@rotrials HA core doesn't install the library system-wide. The library is accessible within the container. The bin directory of pip installs aren't part of the PATH per default. This is all fine. If you want to use miiocli as user please install python-miio locally by

pip3 install python-miio

You should find the executable (miiocli) at .local/bin/miiocli afterwards.

syssi avatar Dec 19 '21 21:12 syssi

@rotrials HA core doesn't install the library system-wide. The library is accessible within the container. The bin directory of pip installs aren't part of the PATH per default. This is all fine. If you want to use miiocli as user please install python-miio locally by

pip3 install python-miio

You should find the executable (miiocli) at .local/bin/miiocli afterwards.

For the people which are reaching to this post, please use sudo pip3 install python-miio in case the command is not working:

Back to our post, here it's the output:

Model: philips.light.hbulb Hardware version: ESP8266 Firmware version: 1.3.7_0029

rotrials avatar Dec 19 '21 22:12 rotrials

If you write the full path in front of the command it should work nevertheless: ~/.local/bin/miiocli. Please think twice if you want to pollute your setup with global pip packages. I cannot recommend global installs.

syssi avatar Dec 19 '21 22:12 syssi