文章目录
mkdocs - Config value: ‘plugins’. Error: The “minify” plugin is not installed
概述
想编译一下mkdocs-material 官方库, 报错如下
D:\3rd_prj\mkdocs-material>mkdocs build
ERROR - Config value: 'plugins'. Error: The "minify" plugin is not installed
Aborted with 1 Configuration Errors!
设置国内源
为了提高装库的速度, 选择国内源
腾讯源:
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
pip config set global.trusted-host mirrors.cloud.tencent.com
清华源:
pip config set global.index-url http://pypi.tuna.tsinghua.edu.cn/simple
pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn
阿里源:
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple
pip config set global.trusted-host mirrors.aliyun.com
这3个国内源, 选一个就行, 我选的清华源
尝试查找minify插件的具体名字
但是我不知道minify插件的具体名字
D:\3rd_prj\mkdocs-material>pip search mkdocs query
ERROR: XMLRPC request failed [code: -32500]
RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.
运行pip search报错
查了资料, 可以用pip-search插件来查找
安装pip-search插件
D:\3rd_prj\mkdocs-material>pip install pip-search
...
Successfully built bs4
Installing collected packages: commonmark, soupsieve, rich, beautifulsoup4, bs4, pip-search
Successfully installed beautifulsoup4-4.11.1 bs4-0.0.1 commonmark-0.9.1 pip-search-0.0.12 rich-12.6.0 soupsieve-2.3.2.post1
用pip_search来查找minify插件的具体名称
D:\3rd_prj\mkdocs-material>pip_search minify
可以看到 mkdocs-minify-plugin 就是minify插件的具体名称
尝试安装minify插件
pip install mkdocs-minify-plugin
...
Successfully built mkdocs-minify-plugin csscompressor htmlmin jsmin
Installing collected packages: jsmin, htmlmin, csscompressor, mkdocs-minify-plugin
Successfully installed csscompressor-0.9.5 htmlmin-0.1.12 jsmin-3.0.1 mkdocs-minify-plugin-0.5.0
可以看到, mkdocs-minify-plugin-0.5.0 安装成功了.