# ImportError: No module named 'digi'

**URL:** <https://forums.digi.com/t/importerror-no-module-named-digi/21302>\
**Category:** XBee - Zigbee\
**Tags:** ccimx6ulsbc, yocto, digi, python, zigbee\
**Created:** [April 21, 2020, 4:51am UTC](https://forums.digi.com/t/importerror-no-module-named-digi/21302 "2020-04-21T04:51:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablovi96](https://avatars.discourse-cdn.com/v4/letter/p/91b2a8/32.png) [@pablovi96](https://forums.digi.com/u/pablovi96)\
**Post date:** [April 21, 2020, 4:51am UTC](https://forums.digi.com/t/importerror-no-module-named-digi/21302/1 "2020-04-21T04:51:09Z")

</div>

Hi,

I have a ccimx6ulsbc with yocto project in which i have installed the python-xbee library at build. I have updated the firmware and now when I try to run a python script in which I use the xbee it doesnt work. The script is:

from digi.xbee.devices import ZigBeeDevice, RemoteZigBeeDevice, XBee64BitAddress  
xbee = ZigBeeDevice(“/dev/ttyXBee”, 9600)  
xbee.open()  
remote = RemoteZigBeeDevice(xbee, XBee64BitAddress.from\_hex\_string(mac))  
xbee.send\_expl\_data(remote, message, se, de, clid, prfid)  
xbee.close()

and the error it shows is:

ImportError: No module named ‘digi’

For including the library at build I have added to the conf/local.conf the following lines:  
IMAGE\_INSTALL\_append = " python3"  
IMAGE\_INSTALL\_append = " python3-requests"  
IMAGE\_INSTALL\_append = " python3-pip"

any idea how to fix it?

---

<div class="post-metadata">

**Author:** ![rmoral](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/rmoral/32/4287_2.png) [@rmoral](https://forums.digi.com/u/rmoral)\
**Post date:** [April 21, 2020, 10:21am UTC](https://forums.digi.com/t/importerror-no-module-named-digi/21302/2 "2020-04-21T10:21:14Z")

</div>

Hi pablovi96,

If you have pip installed on the target, you can install the XBee Python Library with the following command:

python3 -m pip install digi-xbee

Best regards.
