I am currently having an issue when trying to compile some LaTeX with a dot2tex environment : I get an error saying
Opening dot2tex stream test-dot2tex-fig1.dotTraceback (most recent call last):
File "~/.local/bin/dot2tex", line 7, in <module>
from dot2tex.dot2tex import main
File "~/.local/lib/python3.6/site-packages/dot2tex/__init__.py", line 36, in <module>
__version__ = d2t.__version__
AttributeError: module 'dot2tex' has no attribute '__version__'
when trying to compile with pdflatex --shell-escape file.tex : I don't have the figure in the produced pdf.
However, if I add sudo before that, the command works and the pdf is produced correctly.
Does anyone know how I can solve that problem ?
Here is a minimal code that produces the error :
\documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\usepackage[a4paper]{geometry}
\usepackage{dot2texi}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}
\begin{dot2tex}[dot,mathmode,scale = 0.5]
digraph G {
node [shape="circle"];
a [label = "a"];
b [label = "b"];
b -> a ;
}
\end{dot2tex}
\end{document}
dot2tex? This looks like you have two installations: one as user, which is broken and one working as root. Try removing alldot2texinstallations and then do onepip install dot2tex. – DG' Feb 14 '19 at 20:08dot2texwithpip2 install --user dot2texit works. – DG' Feb 14 '19 at 21:06python --versionissues 2.7.15 – egreg Feb 16 '19 at 14:09