From d98f0b3729ff31f474a614503d5ff14b2eb9d0a6 Mon Sep 17 00:00:00 2001 From: Edwin Navarro Date: Mon, 14 Mar 2022 11:01:04 -0700 Subject: [PATCH] Fix pillow import in optionals (Qiskit/qiskit-terra#7774) * Change optionals import for pillow * Text change and co-author Co-authored-by: Jake Lishman * Remove release note Co-authored-by: Jake Lishman --- qiskit_algorithms/utils/optionals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qiskit_algorithms/utils/optionals.py b/qiskit_algorithms/utils/optionals.py index 3cd7043c..35c8201a 100644 --- a/qiskit_algorithms/utils/optionals.py +++ b/qiskit_algorithms/utils/optionals.py @@ -253,7 +253,7 @@ def _nlopt_callback(available): callback=_nlopt_callback, msg="See the documentation of 'qiskit.algorithms.optimizer.nlopts' for installation help", ) -HAS_PIL = _LazyImportTester({"PIL": ("Image",)}, name="pillow", install="pip install pillow") +HAS_PIL = _LazyImportTester("PIL.Image", name="pillow", install="pip install pillow") HAS_PYDOT = _LazyImportTester("pydot", install="pip install pydot") HAS_PYLATEX = _LazyImportTester( {