pyunload
| pyunload | 
  Purpose
 
  
  Synopsis
 
 procedure pyunload
 
  Example
 
 
 The following example releases the Python interpreter:
 
 pyunload
  Further information
 
 
 1. The use of this procedure is optional: the Python interpreter is automatically released at the end of a model execution. However, you may prefer to release it sooner to free resources allocated by Python and to reset the interpreter state. Moreover, releasing the interpreter makes it available for initialization in another Mosel model which is executed in the same Mosel instance.
 
 
 2. Some Python extensions, like NumPy and pandas, do not work if
 pyinit and
 pyunload are called multiple times inside of a single Mosel instance. This is due to a bug in Python's finalization function. See
  https://docs.python.org/3/c-api/init.html\#c.Py\_FinalizeEx and
  https://github.com/numpy/numpy/issues/8097 for more details.
 
 
  Related topics
 
  
