import sys
os.environ['LD_LIBRARY_PATH'] = 'my_path'
subprocess.check_call(['sqsub', '-np', sys.argv[1], '/path/to/executable'],
    env=dict(os.environ, SQSUB_VAR='visible in this subprocess'))
set environment variable in python script