Py Script snap add library

How can I add a library in python script, when I am trying to add any library even simple like
import json
it is throwing error. Please advice