hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
311 stars 60 forks source link

Strange ContextualVersionConflict with nbconvert when formatting pdflatex #68

Closed reckoner closed 8 years ago

reckoner commented 8 years ago

I'm trying to format pdflatex. I don't understand why it's trying to use nbconvert, which evidently has other problems. See below:

xubuntu:1026> doconce format pdflatex intro      
running preprocess -DFORMAT=pdflatex -DDEVICE=screen  intro.do.txt > tmp_preprocess__intro.do.txt
translating doconce text in tmp_preprocess__intro.do.txt to pdflatex
/home/user/anaconda/lib/python2.7/site-packages/IPython/nbformat.py:13: ShimWarning: The `IPython.nbformat` package has been deprecated. You should import from nbformat instead.
  "You should import from nbformat instead.", ShimWarning)
/home/user/anaconda/lib/python2.7/site-packages/nbformat/current.py:19: UserWarning: nbformat.current is deprecated.

- use nbformat for read/write/validate public API
- use nbformat.vX directly to composing notebooks of a particular version

  """)
Traceback (most recent call last):
  File "/home/user/anaconda/bin/doconce", line 1651, in <module>
    main()
  File "/home/user/anaconda/bin/doconce", line 1641, in main
    eval(command + '()')
  File "<string>", line 1, in <module>
  File "/home/user/anaconda/bin/doconce", line 97, in format
    doconce.doconce.format_driver()
  File "/home/user/anaconda/lib/python2.7/site-packages/doconce/doconce.py", line 4954, in format_driver
    out_filename = file2file(filename_preprocessed, format, basename)
  File "/home/user/anaconda/lib/python2.7/site-packages/doconce/doconce.py", line 3857, in file2file
    filestr = doconce2format(filestr, format)
  File "/home/user/anaconda/lib/python2.7/site-packages/doconce/doconce.py", line 4328, in doconce2format
    tex_blocks, format)
  File "/home/user/anaconda/lib/python2.7/site-packages/doconce/latex.py", line 523, in latex_code
    envirs += get_legal_pygments_lexers()
  File "/home/user/anaconda/lib/python2.7/site-packages/doconce/common.py", line 1079, in get_legal_pygments_lexers
    for classname, names, dummy, dymmy in list(get_all_lexers()):
  File "/home/user/anaconda/lib/python2.7/site-packages/pygments/lexers/__init__.py", line 53, in get_all_lexers
    for lexer in find_plugin_lexers():
  File "/home/user/anaconda/lib/python2.7/site-packages/pygments/plugin.py", line 53, in find_plugin_lexers
    yield entrypoint.load()
  File "/home/user/anaconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2379, in load
    self.require(*args, **kwargs)
  File "/home/user/anaconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2396, in require
    items = working_set.resolve(reqs, env, installer)
  File "/home/user/anaconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 833, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (path.py 0.0.0 (/home/user/anaconda/lib/python2.7/site-packages), Requirement.parse('path.py>=6.2'), set(['pickleshare']))
hplgit commented 8 years ago

The nbconvert messages comes from general import of IPython that is done by doconce, if you have IPython installed. Could be some version problem?

The other problem has to do with the pygments package. Might be some problem with the installation here too. I have never seen anything like this message before.

Try a minimalistic example in pdflatex and html with a code block and use --latex_code_style=pyg for pdflatex; both then apply pygments for typesetting code.

reckoner commented 8 years ago

You're right. something's wrong with the METADATA in path.py module.