I also tried to re-install the library and still doesnât workâŚ
pi@raspberrypi:~ $ sudo pip install cayenne-mqtt
Requirement already satisfied: cayenne-mqtt in /usr/local/lib/python2.7/dist-packages/cayenne_mqtt-1.0.1-py2.7.egg
Requirement already satisfied: paho-mqtt>=1.0 in /usr/local/lib/python2.7/dist-packages/paho_mqtt-1.3.1-py2.7.egg (from cayenne-mqtt)
pi@raspberrypi:~ $ python
Python 2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170124] on linux2
Type âhelpâ, âcopyrightâ, âcreditsâ or âlicenseâ for more information.
import cayenne
Traceback (most recent call last):
File ââ, line 1, in
File âcayenne.pyâ, line 2, in
import cayenne.client
ImportError: No module named client
do not name the folder where your py file is cayenne. when you do import module, it will check locally and python finds a folder named cayenne. it will try to use that folder as module and import client.py from that folder.