1.cannot import name 'environmentfilter' from 'jinja2'
(p2) PS E:\08.paddle\PaddleScience-develop\docs> .\make.bat Traceback (most recent call last): File "C:\miniconda3\envs\p2\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\miniconda3\envs\p2\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\miniconda3\envs\p2\Scripts\sphinx-build.exe\__main__.py", line 4, in <module> File "C:\miniconda3\envs\p2\lib\site-packages\sphinx\cmd\build.py", line 25, in <module> from sphinx.application import Sphinx File "C:\miniconda3\envs\p2\lib\site-packages\sphinx\application.py", line 43, in <module> from sphinx.registry import SphinxComponentRegistry File "C:\miniconda3\envs\p2\lib\site-packages\sphinx\registry.py", line 24, in <module> from sphinx.builders import Builder File "C:\miniconda3\envs\p2\lib\site-packages\sphinx\builders\__init__.py", line 26, in <module> from sphinx.util import import_object, logging, progress_message, rst, status_iterator File "C:\miniconda3\envs\p2\lib\site-packages\sphinx\util\rst.py", line 21, in <module> from jinja2 import Environment, environmentfilter ImportError: cannot import name 'environmentfilter' from 'jinja2' (C:\miniconda3\envs\p2\lib\site-packages\jinja2\__init__.py) (p2) PS E:\08.paddle\PaddleScience-develop\docs>
感觉好纳闷啊啊啊,通过百度,据悉是jinja2版本过高,哭晕了。
pip list发现 jinja2版本为3.1.2
Jinja2 3.1.2
于是乎降级先
pip install jinja2==2.10.1
2.ImportError: cannot import name 'soft_unicode' from 'markupsafe'
结果继续报错
(p2) PS E:\08.paddle\PaddleScience-develop\docs> .\make.bat Traceback (most recent call last): File "C:\miniconda3\envs\p2\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\miniconda3\envs\p2\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\miniconda3\envs\p2\Scripts\sphinx-build.exe\__main__.py", line 4, in <module> File "C:\miniconda3\envs\p2\lib\site-packages\sphinx\cmd\build.py", line 25, in <module> from sphinx.application import Sphinx File "C:\miniconda3\envs\p2\lib\site-packages\sphinx\application.py", line 32, in <module> from sphinx.config import Config File "C:\miniconda3\envs\p2\lib\site-packages\sphinx\config.py", line 27, in <module> from sphinx.util.tags import Tags File "C:\miniconda3\envs\p2\lib\site-packages\sphinx\util\tags.py", line 11, in <module> from jinja2 import nodes File "C:\miniconda3\envs\p2\lib\site-packages\jinja2\__init__.py", line 33, in <module> from jinja2.environment import Environment, Template File "C:\miniconda3\envs\p2\lib\site-packages\jinja2\environment.py", line 15, in <module> from jinja2 import nodes File "C:\miniconda3\envs\p2\lib\site-packages\jinja2\nodes.py", line 19, in <module> from jinja2.utils import Markup File "C:\miniconda3\envs\p2\lib\site-packages\jinja2\utils.py", line 647, in <module> from markupsafe import Markup, escape, soft_unicode ImportError: cannot import name 'soft_unicode' from 'markupsafe' (C:\miniconda3\envs\p2\lib\site-packages\markupsafe\__init__.py)
继续降级
pip install markupsafe==1.1.1