1

当运行 lektor server 来部署和查看我的网站时,它报告 markdown 在安装时不存在。

/usr/local/lib/lektor/lib/python3.7/site-packages/watchdog/utils/bricks.py:175: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working

  class OrderedSet(collections.MutableSet):
Traceback (most recent call last):
...

  File "/home/nick/swingrock.be/lektor/packages/tipue-content-file-generator/lektor_tipue_content_file_generator.py", line 7, in <module>
    import markdown

ModuleNotFoundError: No module named 'markdown'

但是安装了markdown,你可以在这里看到版本

nick@nick-VirtualBox:~/swingrock.be/lektor$ markdown --version

This is Markdown, version 1.0.1.
Copyright 2004 John Gruber
http://daringfireball.net/projects/markdown/

有没有我遗漏的步骤?

4

2 回答 2

1

您似乎已经安装了 Markdown 的Perl 实现。但是,您的脚本似乎需要Python 实现,但由于您没有安装该实现,因此没有找到它。您可以使用以下命令安装它(确保以具有必要权限的用户身份运行该命令):

pip install markdown
于 2019-10-03T20:28:43.830 回答
0

我有一个类似的错误。使用当前版本的 Lektor 3.1.3,我需要降级Werkzeug到版本 0.16。

我强烈建议不要在系统范围内安装的 python 环境中执行此操作。相反,您应该安装一个python 虚拟环境

这现在可能看起来很乏味,但值得。

python3 -m venv ~/venv_lektor
~/venv_lektor/bin/pip install lektor
~/venv_lektor/bin/pip install Werkzeug==0.16
~/venv_lektor/bin/lektor --version
~/venv_lektor/bin/lektor quickstart --name "Test-Site"
cd ~/Test-Site/
~/venv_lektor/bin/lektor server
于 2020-05-28T11:47:24.747 回答