Trying to run below snippet to generate circuit diagram in a Jupyter notebook on Windows.

import qiskit
qc = qiskit.QuantumCircuit(1)

I have install the texlive for windows as mentioned here. Although, this still throws below error trace:

MissingOptionalLibraryError               Traceback (most recent call last)
Input In [2], in <cell line: 4>()
      2 qc = qiskit.QuantumCircuit(1)
      3 qc.x(0)
----> 4 qc.draw('latex')
MissingOptionalLibraryError: "The 'pdflatex' library is required to use 'LaTeX circuit drawing'.  You will likely need to install a full LaTeX distribution for your system."

Anything missing?


1 Answer 1


It seems the executable pdflatex is not in path. You might need to restart your Windows or extend the PATH variable with the pdflatex directory.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.