Closed fazilii closed 2 years ago
From the error, my guess is you need to upgrade jinja2. There have been some breakages in the ecosystem, but most got smoothed over a month or two ago.
From the error, my guess is you need to upgrade jinja2.
actually jinja2 wasn't that needed upgrading. Rather it was Sphinx, which was throwing importError while importing from jinja2. but once i updated it, all errors were resolved.
Glad to hear it's resolved.
Summary
I am trying to install NiPype on a machine running Ubuntu 20.04.4 LTS (64 bit). pip install -r requirements.txt and pip install -e .[dev] ran successfully without any hindrance. but when i tried to test the implementation by running pytest -v --doctest-modules nipype it gives 3 errors.
Actual behavior
fazili@Ibrahim:~/nipype$ pytest -v --doctest-modules nipype ============================= test session starts ============================== platform linux -- Python 3.8.10, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3 cachedir: .pytest_cache rootdir: /home/fazili/nipype/nipype, configfile: pytest.ini plugins: timeout-2.1.0, cov-2.11.1, env-0.6.2 collected 2973 items / 3 errors / 2970 selected
==================================== ERRORS ==================================== ERROR collecting sphinxext/documenter.py nipype/sphinxext/documenter.py:3: in
from sphinx.ext import autodoc
../.local/lib/python3.8/site-packages/sphinx/ext/autodoc/init.py:24: in
from sphinx.application import Sphinx
../.local/lib/python3.8/site-packages/sphinx/application.py:32: in
from sphinx.config import Config
../.local/lib/python3.8/site-packages/sphinx/config.py:27: in
from sphinx.util.tags import Tags
../.local/lib/python3.8/site-packages/sphinx/util/tags.py:11: in
from jinja2 import nodes
../.local/lib/python3.8/site-packages/jinja2/init.py:12: in
from .environment import Environment
../.local/lib/python3.8/site-packages/jinja2/environment.py:25: in
from .defaults import BLOCK_END_STRING
../.local/lib/python3.8/site-packages/jinja2/defaults.py:3: in
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
../.local/lib/python3.8/site-packages/jinja2/filters.py:13: in
from markupsafe import soft_unicode
E ImportError: cannot import name 'softunicode' from 'markupsafe' (/home/fazili/.local/lib/python3.8/site-packages/markupsafe/init.py)
____ ERROR collecting sphinxext/apidoc/init.py ____
nipype/sphinxext/apidoc/init.py:5: in
from sphinx.ext.napoleon import (
../.local/lib/python3.8/site-packages/sphinx/ext/napoleon/init.py:14: in
from sphinx.application import Sphinx
../.local/lib/python3.8/site-packages/sphinx/application.py:32: in
from sphinx.config import Config
../.local/lib/python3.8/site-packages/sphinx/config.py:27: in
from sphinx.util.tags import Tags
../.local/lib/python3.8/site-packages/sphinx/util/tags.py:11: in
from jinja2 import nodes
../.local/lib/python3.8/site-packages/jinja2/init.py:12: in
from .environment import Environment
../.local/lib/python3.8/site-packages/jinja2/environment.py:25: in
from .defaults import BLOCK_END_STRING
../.local/lib/python3.8/site-packages/jinja2/defaults.py:3: in
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
../.local/lib/python3.8/site-packages/jinja2/filters.py:13: in
from markupsafe import soft_unicode
E ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/fazili/.local/lib/python3.8/site-packages/markupsafe/init.py)
____ ERROR collecting sphinxext/apidoc/docstring.py ____
/usr/lib/python3.8/importlib/init.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)