电子书转换吐出python错误?有人能理解错误吗?

时间:2016-02-25 11:20:46

标签: python node.js converter calibre

我想和Gitbook一起运行ebook-convert,从我的静态文件中生成自己的pdf文件。当我输入ebook-convert时,我收到了这个愚蠢的错误消息......

我安装了

  • 新版本的python
  • 使用NPM安装convert-ebook
  • 和Gitbook完美运行

有谁知道我能做什么?

Python function terminated unexpectedly: dlopen(/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so
Traceback (most recent call last):
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 209, in main
    return run_entry_point()
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 113, in run_entry_point
    pmod = __import__(mod, fromlist=[1], level=0)
  File "site-packages/calibre/__init__.py", line 22, in <module>
  File "site-packages/calibre/startup.py", line 51, in <module>
  File "site-packages/calibre/ptempfile.py", line 8, in <module>
  File "lib/python2.7/tempfile.py", line 32, in <module>
  File "lib/python2.7/io.py", line 51, in <module>
ImportError: dlopen(/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so

2 个答案:

答案 0 :(得分:3)

我遇到了同样的问题并通过将Python从2.7.10更新到2.7.11来修复它。

答案 1 :(得分:0)

我使用我的系统python lib-dynload/_io.so替换为

/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so

那么它有效,希望它可以帮助你。

TKS