\draw (-6,0)--(0,6);

How to fix this error:

LaTeX Error: File tikz.sty not found.


2 Answers 2


You need to call MiKTeX Console in the apps of Windows.

Then you have to choose using user mode or admin mode (I have an admin installation, so you will see admin mode in the following ...)

After that you have to click on packages (see left red circle):

miktex console

Now type tikz where the red arrow points to.

Now click on the symbol marked with the right red circle to get a list of installable packages containing tikz in the filename.

At last click on the +-sign before tikz to install the selected packages.

Do the same with pgf:

pgf installation


Such errors occur from time to time with newer versions of Miktex and Latex packages, and while there are some fine solutions, often the good ol' reinstall of Miktex turns to be the least time consuming. (I mean a fresh install of the latest MiKTeX version.) Not to mention that it's often caused by a bug in Miktex, and then what you would be looking for is a workaround which might, or might not work.

Good luck!

  • 1
    Welcome to TeX.SE! Sorry that is not true. In this case the basic MiKTeX does not include TiKz -- therefore the error!
    – Mensch
    Feb 2, 2019 at 18:56
  • Thank! Yes, the basic MiKTeX doesn't include TiKz, after the fresh install all packages would need to be installed again. However, after the fresh install all new packages are installed smoothly - without any errors. That's just my humble experience. I believe it's because of everything being up-to-date, including the package repository.
    – gari
    Feb 2, 2019 at 19:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .