configure_python_environment function

Configure python environment