I was trying to run SCT functions in Jupyter notebook, but some functions return the following errors:
Traceback (most recent call last):
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/spinalcordtoolbox/scripts/sct_process_segmentation.py", line 30, in <module>
from spinalcordtoolbox.scripts import sct_maths
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/spinalcordtoolbox/scripts/sct_maths.py", line 18, in <module>
import matplotlib.pyplot as plt
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/python/envs/venv_sct/lib/python3.7/site-packages/matplotlib/pyplot.py", line 2230, in <module>
switch_backend(rcParams["backend"])
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/python/envs/venv_sct/lib/python3.7/site-packages/matplotlib/pyplot.py", line 267, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/python/envs/venv_sct/lib/python3.7/site-packages/matplotlib/pyplot.py", line 268, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/python/envs/venv_sct/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'matplotlib_inline'
Traceback (most recent call last):
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/spinalcordtoolbox/scripts/sct_process_segmentation.py", line 30, in <module>
from spinalcordtoolbox.scripts import sct_maths
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/spinalcordtoolbox/scripts/sct_maths.py", line 18, in <module>
import matplotlib.pyplot as plt
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/python/envs/venv_sct/lib/python3.7/site-packages/matplotlib/pyplot.py", line 2230, in <module>
switch_backend(rcParams["backend"])
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/python/envs/venv_sct/lib/python3.7/site-packages/matplotlib/pyplot.py", line 267, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/python/envs/venv_sct/lib/python3.7/site-packages/matplotlib/pyplot.py", line 268, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/python/envs/venv_sct/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Users/en_tetteh/NEUROPOLY/spinalcordtoolbox/python/envs/venv_sct/lib/python3.7/site-packages/matplotlib_inline/backend_inline.py", line 15, in <module>
from IPython.core.interactiveshell import InteractiveShell
ModuleNotFoundError: No module named 'IPython'