network2tikz icon indicating copy to clipboard operation
network2tikz copied to clipboard

No LaTex compiler was found!

Open johentsch opened this issue 5 years ago • 2 comments

Hi there,

I am new to network2tikz and am really glad that it exists! Everything is working fine except compiling the generated latex code on the fly. I have tried it within Jupyter Lab, Atom/Hydrogen but also running the script from the command line. I have also tried passing compiler='pdflatex' although the docs say it should be used automatically. I do have it installed but every time I get the same error:

No LaTex compiler was found! Either specify a LaTex compiler or make sure you have latexmk             or pdfLaTex installed.
---------------------------------------------------------------------------
CnetError                                 Traceback (most recent call last)
    <ipython-input-17-bdcb093bcec3> in <module>
      6 visual_style['vertex_label_as_id'] = True
      7 #visual_style['compiler'] = 'pdflatex'
----> 8 plot(G,'test.pdf',**visual_style)

~/anaconda3/lib/python3.7/site-packages/network2tikz/plot.py in __call__(self, network,     filename, type, **kwds)
    564         """
    565         self.drawers = [TikzNetworkDrawer(network, **kwds)]
--> 566         self.save(filename, type=type, **kwds)
    567 
    568     def add(self, network, **kwds):

~/anaconda3/lib/python3.7/site-packages/network2tikz/plot.py in save(self, filename, type,     **kwds)
    667             self.save_pdf(filename, clean=_clean, clean_tex=_clean_tex,
    668                           compiler=_compiler, compiler_args=_compiler_args,
--> 669                           silent=_silent)
    670         else:
    671             log.warn('No valid output option was chosen!')

~/anaconda3/lib/python3.7/site-packages/network2tikz/plot.py in save_pdf(self, filename,     clean, clean_tex, compiler, compiler_args, silent)
    877                       'compiler or make sure you have latexmk or pdfLaTex'
    878                       ' installed.')
--> 879             raise CnetError
    880 
    881         # change back to current dir
    CnetError: 

Is there anything I can do about it?

johentsch avatar Sep 17 '19 12:09 johentsch

Hi, I will have a look and see if I can help.

hackl avatar Sep 30 '19 06:09 hackl

I'm having the same issue inside jupyter notebook.

ciwanceylan avatar Aug 25 '20 17:08 ciwanceylan