You have to have a version of ArcMap installed on the computer you are running it on.
Dr Google has some examples of code snippets that require QGIS if you don't have an Arc* product installed
If you don't have a version of ArcGIS installed on your computer you won't be able to access the arcpy module with python.
An other really easy way to convert spatial formats with python is to use GDAL/OGR.
This link will walk you through how to write to kml:
Thanks for your advice.By the way, how can I get the arcgisscripting
library for my project.Because when I run the standalone query,it says this
library is missing.But it is in the ARCGis installation folder.Without the
ARCGis installation,I cannot run the standalone program