You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is supposed to be a guide to help fix the "c10.dll loading error" and the "typing.io is not a package" error for people using newer Python and PyTorch versions, without having to downgrade either. I use Python 3.14.2, PyTorch 2.10.0+cpu and Windows 11 25H2.
I encountered some issues after installing the package using pip install "pix2tex[gui]" and calling latexocr in Windows Command Prompt.
After some digging I found some solutions spread throughout GitHub and decided to make this thread in hopes of simplifying the troubleshooting for other people having the same issues.
To fix the c10.dll error I followed solution 3 from pytroch/issues/166628, which I found through latexocr error #436.
The solution states to import torch before PyQt. I did so by going into \pix2tex\gui.py and adding import torch below import tempfile.
After fixing the c10.dll error, I got a new error: ModuleNotFoundError: No module named 'typing.io'; 'typing' is not a package. I found this solution:
I have tracked down the problem. The issue is that pix2tex[gui] requires latex2sympy2 which requires antlr4-python3-runtime==4.7.2.
It should be noted that the Sympy format seems to not function properly after this fix.
I am not knowledgeable enough regarding these things to know exactly what I am doing, but this is what allowed me to use the GUI.
I hope someone can make use of this, as I have looked for something similar to this during my troubleshooting.
This is supposed to be a guide to help fix the "c10.dll loading error" and the "typing.io is not a package" error for people using newer Python and PyTorch versions, without having to downgrade either. I use Python 3.14.2, PyTorch 2.10.0+cpu and Windows 11 25H2.
I encountered some issues after installing the package using
pip install "pix2tex[gui]"and callinglatexocrin Windows Command Prompt.After some digging I found some solutions spread throughout GitHub and decided to make this thread in hopes of simplifying the troubleshooting for other people having the same issues.
To fix the c10.dll error I followed solution 3 from pytroch/issues/166628, which I found through latexocr error #436.
The solution states to import torch before PyQt. I did so by going into
\pix2tex\gui.pyand addingimport torchbelowimport tempfile.After fixing the c10.dll error, I got a new error:
ModuleNotFoundError: No module named 'typing.io'; 'typing' is not a package. I found this solution:Originally posted by @Giuseppe499 in #415
It should be noted that the Sympy format seems to not function properly after this fix.
I am not knowledgeable enough regarding these things to know exactly what I am doing, but this is what allowed me to use the GUI.
I hope someone can make use of this, as I have looked for something similar to this during my troubleshooting.