add refresh method,Used when the python-env changes.