Skip to content

Commit f81e5a8

Browse files
Improve mesage on failed Graphviz optional (#11896) (#12072)
* Improve mesage on failed Graphviz optional I have recently seen several users struggle to install a complete version of Graphviz upon seeing the `MissingOptionalLibraryError` message. This updates the message to make it clearer that the PyPI distribution `graphviz` *is not* the actual Graphviz software, and it must be installed separately. * Tweak message (cherry picked from commit 17949dc) Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
1 parent 9dbf5d1 commit f81e5a8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

qiskit/utils/optionals.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,12 @@
307307

308308
HAS_GRAPHVIZ = _LazySubprocessTester(
309309
("dot", "-V"),
310-
name="graphviz",
311-
install="'brew install graphviz' if on Mac, or by downloding it from their website",
310+
name="Graphviz",
311+
msg=(
312+
"To install, follow the instructions at https://graphviz.org/download/."
313+
" Qiskit needs the Graphviz binaries, which the 'graphviz' package on pip does not install."
314+
" You must install the actual Graphviz software"
315+
),
312316
)
313317
HAS_PDFLATEX = _LazySubprocessTester(
314318
("pdflatex", "-version"),

0 commit comments

Comments
 (0)