The tool specified is not licensed. Whenever a tool is executed in a script, an ArcGIS Desktop license is required. Tools from ArcGIS extensions, such as ArcGIS ArcGIS Spatial Analyst extension, require an additional license for that extension. If the necessary licenses are not available, a tool will fail and return appropriate error messages.
When using an ArcGIS Desktop Basic or ArcGIS Desktop Standard license, a script should set the product to ArcGIS Desktop Basic or ArcGIS Desktop Standard. Likewise, when using an ArcGIS Engine or EngineGeoDB license, a script should set the product to Engine or EngineGeoDB. If a license is not explicitly set, the first time ArcPy is used, the license will be initialized based on the highest available license level.