# LBFGS2 optimizer missing from python

**URL:** <https://discourse.itk.org/t/lbfgs2-optimizer-missing-from-python/4648>\
**Category:** Beginner Questions\
**Tags:** python\
**Created:** [December 8, 2021, 1:28am UTC](https://discourse.itk.org/t/lbfgs2-optimizer-missing-from-python/4648 "2021-12-08T01:28:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthew.andrew17](https://discourse.itk.org/user_avatar/discourse.itk.org/matthew.andrew17/32/2434_2.png) [@matthew.andrew17](https://discourse.itk.org/u/matthew.andrew17)\
**Post date:** [December 8, 2021, 1:28am UTC](https://discourse.itk.org/t/lbfgs2-optimizer-missing-from-python/4648/1 "2021-12-08T01:28:57Z")

</div>

The LBFGS2 optimizer seems to be missing from the python pip install - from the docs there should be a couple of classes (which are available in simpleITK) - LBFGS2Optimizerv4Enums and LBFGS2Optimizerv4Template. Only LBFGSB and LBFGS are available (not LBFGS2).

Ive tried on 5.2.1, 5.0 and the 5.3 pre-release both RC1 and RC2.

Is this intentional? Sorry if I am being dense here, but I’ve been using it with simpleITK as was hoping to try it out directly from the itk python interface.

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [December 8, 2021, 3:36pm UTC](https://discourse.itk.org/t/lbfgs2-optimizer-missing-from-python/4648/2 "2021-12-08T15:36:05Z")

</div>

`LBFGS2` is indeed missing a [wrapping specification](https://github.com/InsightSoftwareConsortium/ITK/tree/v5.3rc02/Modules/Numerics/Optimizersv4/wrapping). Adding it should be [simple](https://github.com/InsightSoftwareConsortium/ITK/blob/v5.3rc02/Modules/Numerics/Optimizersv4/wrapping/itkLBFGSBOptimizerv4.wrap). Do you want to [give it a try](https://github.com/InsightSoftwareConsortium/ITK/blob/master/CONTRIBUTING.md)?
