0

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}
GBathie
  • 103

1 Answers1

0

dot2tex seems to broken for python 3. You have to use python 2 instead:

  • Uninstall dot2tex for python 3: $ pip3 uninstall dot2tex
  • Install dot2tex for python 2: $ pip2 install dot2tex
DG'
  • 21,727