我已經成功在Windows/Python 3.4上安裝了sphnix,然後通過調用sphinx-quickstart
成功生成了一個基本結構。Sphinx在Python 3.4上拋出一個異常/ Windows
但調用sphinx-build html
或make html
時,它拋出一個異常:
D:\my-doc>make html
Traceback (most recent call last):
File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main "__main__", mod_spec)
File "C:\Python34\lib\runpy.py", line 85, in _run_code exec(code, run_globals)
File "C:\Python34\Scripts\sphinx-build.exe\__main__.py", line 9, in <module>
File "C:\Python34\lib\site-packages\sphinx\__init__.py", line 51, in main sys.exit(build_main(argv))
File "C:\Python34\lib\site-packages\sphinx\__init__.py", line 61, in build_main from sphinx import cmdline
File "C:\Python34\lib\site-packages\sphinx\cmdline.py", line 23, in <module> from sphinx.application import Sphinx
File "C:\Python34\lib\site-packages\sphinx\application.py", line 37, in <module> from sphinx.builders import BUILTIN_BUILDERS
File "C:\Python34\lib\site-packages\sphinx\builders\__init__.py", line 23, in <module> from sphinx.util import i18n, path_stabilize
File "C:\Python34\lib\site-packages\sphinx\util\i18n.py", line 15, in <module> from babel.messages.pofile import read_po
File "C:\Python34\lib\site-packages\babel\messages\__init__.py", line 12, in <module> from babel.messages.catalog import *
File "C:\Python34\lib\site-packages\babel\messages\catalog.py", line 23, in <module> from babel.dates import format_datetime
File "C:\Python34\lib\site-packages\babel\dates.py", line 28, in <module> from babel.util import UTC, LOCALTZ
File "C:\Python34\lib\site-packages\babel\util.py", line 278, in <module> from babel import localtime
File "C:\Python34\lib\site-packages\babel\localtime\__init__.py", line 21, in <module> from babel.localtime._win32 import _get_localzone
File "C:\Python34\lib\site-packages\babel\localtime\_win32.py", line 18, in <module> tz_names = get_global('windows_zone_mapping')
File "C:\Python34\lib\site-packages\babel\core.py", line 58, in get_global _global_data = pickle.load(fileobj) TypeError: an integer is required (got type str)
我想這是關於兼容性,因爲我已經跟着一步教程一步。此問題也一直在Google上搜索幾個小時,到目前爲止還找不到答案。這是我做錯了什麼,還是兼容性問題?
是否有'conf.py'(或其他配置文件)是時區,但是以字符串形式給出? (查看回溯的最後幾行)。例如,使用「2」而不是「2」。 – Evert
你並不孤單:我在Python 3.4/Windows上遇到同樣的錯誤。現在看看這個問題... – Vijchti