pi@raspberrypi:~ $ pip3 install msmart
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting msmart
Downloading https://files.pythonhosted.org/packages/3d/d8/207778784f551d85ccf08392e569eb4aa5da0dbf8a8c977663256204ba07/msmart-0.1.20-py3-none-any.whl
Collecting pycryptodome (from msmart)
Downloading https://www.piwheels.org/simple/pycryptodome/pycryptodome-3.9.8-cp37-cp37m-linux_armv7l.whl (13.7MB)
100% |████████████████████████████████| 13.7MB 6.8kB/s
Installing collected packages: pycryptodome, msmart
The script midea-discover is installed in '/home/pi/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed msmart-0.1.20 pycryptodome-3.9.8
后 输入
midea-discover报错-bash: The: command not found
然后 以为是没有pip3
然后就照这个 树莓派安装pip3以及扩展包的方法稀里糊涂的安装并且升级了一下pip3
pi@raspberrypi:/usr/local/src/pip-8.0.2 $ sudo pip3 install --upgrade pip -i http://pypi.douban.com/simple/
The repository located at pypi.douban.com 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 pypi.douban.com'.
Collecting pip
The repository located at pypi.douban.com 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 pypi.douban.com'.
Downloading https://www.piwheels.org/simple/pip/pip-20.1.1-py2.py3-none-any.whl (1.5MB)
100% |████████████████████████████████| 1.5MB 18kB/s
Installing collected packages: pip
Found existing installation: pip 8.0.2
Uninstalling pip-8.0.2:
Successfully uninstalled pip-8.0.2
Successfully installed pip-20.1.1
pi@raspberrypi:/usr/local/src/pip-8.0.2 $ pip3 --version
-bash: /usr/bin/pip3: No such file or directory
版本也没查到,运行你的命令还是报错,
pi@raspberrypi:~ $ midea-discover
-bash: midea-discover: command not found
你的第一段代码里面有个报错,The script midea-discover is installed in '/home/pi/.local/bin' which is not on PATH. 你可以直接去 /home/pi/.local/bin 下面执行 ./midea-discover -d ,或者把 /home/pi/.local/bin 添加到 PATH 环境变量里面一劳永逸
root@gp-VirtualBox:/home/gp# midea-discover
INFO:msmart.cli:msmart version: 0.1.20
INFO:msmart.cliiscovering devices with UDP Broadcast, press CTRL-C to quit...
INFO:msmart.cli:Midea Local Data 192.168.1.102 837000b8200f04305a5a0111a8007a8000000000000000000000000087310000001300000000000000000000000000003a84d65e65ecbab8aced481dd3a51e201448d12b8218ad02a295acc72da3e2652ac5cabea2f058593f593603a4e255864d46283d4b2e0c9e2dcb944c91b14a8781d6e799fc77387c5440ef04fd2959944f96c52b4be647bea77b6f3b357843b306c416020931f48926620dfe95e231114002651063cc8373bbc07bba6db44beb600c966db378349e4848f4907c5d8cd2
INFO:msmart.lan:Couldn't connect with Device 192.168.1.102:6444
root@gp-VirtualBox:/home/gp# midea-discover
INFO:msmart.cli:msmart version: 0.1.20
INFO:msmart.cli:Discovering devices with UDP Broadcast, press CTRL-C to quit...
INFO:msmart.cli:Midea Local Data 192.168.1.102 837000b8200f04305a5a0111a8007a8000000000000000000000000087310000001300000000000000000000000000003a84d65e65ecbab8aced481dd3a51e201448d12b8218ad02a295acc72da3e2652ac5cabea2f058593f593603a4e255864d46283d4b2e0c9e2dcb944c91b14a8781d6e799fc77387c5440ef04fd2959944f96c52b4be647bea77b6f3b357843b306c416020931f48926620dfe95e231114002651063cc8373bbc07bba6db44beb600c966db378349e4848f4907c5d8cd2
INFO:msmart.lan:Couldn't connect with Device 192.168.1.102:6444
INFO:msmart.cli:*** Found a unsupported '0xac' at 192.168.1.102 - id: 208907209XXXXX - sn: 31122011737872XXXXXXXX0000 - ssid: midea_ac_0512