安装pandoc时出错

时间:2015-04-17 22:33:42

标签: python ipython-notebook pandoc

我正在使用Windows 7.目的是让nbconvert正常工作。我有最新的ipython 3.1.0或jupyter。

C:\Users\yang>pip install pandoc

Collecting pandoc
 Using cached pandoc-1.0.0a8.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File "c:\users\yang\appdata\local\temp\pip-build-_lwwnn\pandoc\setup.py",
line 27, in <module>
    import about
  File "c:\users\yang\appdata\local\temp\pip-build-_lwwnn\pandoc\.lib\about\
__init__.py", line 17, in <module>
    import sh
  File "c:\users\yang\appdata\local\temp\pip-build-_lwwnn\pandoc\.lib\sh.py"
, line 37, in <module>
    support." % __version__)
ImportError: sh 1.11 is currently only supported on linux and osx. please in
stall pbs 0.110 (http://pypi.python.org/pypi/pbs) for windows support.

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\yang
\appdata\local\temp\pip-build-_lwwnn\pandoc

我成功安装了pbs,但没有解决此问题。请帮忙。

3 个答案:

答案 0 :(得分:1)

pandoc不是Python包。尝试从here安装最新版本。这是direct link

答案 1 :(得分:0)

pandoc包需要sh包。这导致sh 1.11安装。 sh显然是the successor to pbsno longer supports Windows

很遗憾,pandoc包似乎也不支持Windows,因为它尝试导入sh,而不是pbs。您可以考虑报告问题。也许你可以使用pypandoc来代替。

答案 2 :(得分:0)

也许您需要使用:

pip install pypandoc