No Module AttributeError

I’m using Python Digi ESP to use the code for Xbee and Serial.Serial
and I’m getting

Attribute Error: No module named Serial

Attribute ErrorL No module named Xbee

Do you know how can I fix this error?

I’m directly using the sample projects from Digi ESP.

How you are running your application, Run As Python Run or remote Digi Python Application?

Check whether you have file on your device