按 https://getnikola.com/getting-started.html 试用nikola写博客,但实验遇到错误,求教问题出在哪里。
> nikola init --demo test
Traceback (most recent call last):
File “/usr/local/bin/nikola”, line 11, in
sys.exit(main())
File “/usr/local/lib/python2.7/dist-packages/nikola/main.py”, line 168, in main
DN = DoitNikola(site, quiet)
File “/usr/local/lib/python2.7/dist-packages/nikola/main.py”, line 297, in init
super(DoitNikola, self).init()
File “/usr/local/lib/python2.7/dist-packages/doit/doit_cmd.py”, line 59, in init
ini_config = self.load_config_ini(config_filenames)
File “/usr/local/lib/python2.7/dist-packages/doit/doit_cmd.py”, line 72, in load_config_ini
cfg_parser = ConfigParser(allow_no_value=True, delimiters=(’=’,))
TypeError: init() got an unexpected keyword argument ‘delimiters’
跟我念:Py3 大法好
感谢hosiet提示。切换到python3就运行正常了。
virtualenv -p /usr/bin/python3 nikola
cd nikola
source bin/activate