can not set the camera viewpoint?
Is this the entire script?  It looks like you forgot to import required modules.  

import os  
import math  

Edit:  

Er, well, I think Blender automatically does import math as *
so you'd remove the preceding math. from radians.  

I believe you'd still need to import os, unless I'm mistaken about that point.  

Edit  You have to define functions before you can run them in Python.  Don't know exactly what you're trying to accomplish with node tree in your run function, so I chopped that out for now, but this script at least runs.  


import bpy, os
from math import *

# rendering constants
RENDER_RES_X = 640
RENDER_RES_Y = 480
FRAME_NO = 1

def configureBlender():
    bpy.context.scene.frame_current = FRAME_NO
    bpy.context.scene.render.resolution_x = RENDER_RES_X
    bpy.context.scene.render.resolution_y = RENDER_RES_Y
    bpy.context.scene.render.use_border = False

def run(output_dir):
    bpy.context.scene.render.filepath = output_dir
    bpy.ops.render.render(write_still=True)

def setCameraPosition(location, rotation):
    bpy.data.objects['Camera'].location = location
    bpy.data.objects['Camera'].rotation_euler = [radians(rotation[0]), radians(rotation[1]), radians(rotation[2]) ]

if __name__ == "__main__":
    configureBlender()
    setCameraPosition([0.49123,-2.22974,6.74501],[123.942,0.578,0.1])
    run(os.path.dirname(os.path.realpath(__file__))+'/test')