Intel® Distribution for Python*
Support and discussions for achieving faster Python* applications and core computational packages.
391 Discussions

Intelpython3 - raise RuntimeError("The WebAgg backend requires Tornado.")

jordan__cyrus
Beginner
2,052 Views

Hello All,

I finished installing Intel® Parallel Studio XE Cluster Edition for Linux* onto my machine, current OS: Linux Mint 19.2 Tina \n \l

I am unable to execute my python scripts which utilize matplotlib.

when running a script which calls "import matplotlib.pyplot as plt" I receive the following error.

Traceback (most recent call last):
  File "/home/cyrus/intel/intelpython3/lib/python3.6/site-packages/matplotlib/backends/backend_webagg.py", line 26, in
 <module>
    import tornado
ModuleNotFoundError: No module named 'tornado'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "postn.py", line 2, in <module>
    import matplotlib.pyplot as plt
  File "/home/cyrus/intel/intelpython3/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2355, in <module>
    switch_backend(rcParams["backend"])
  File "/home/cyrus/intel/intelpython3/lib/python3.6/site-packages/matplotlib/pyplot.py", line 221, in switch_backend
    backend_mod = importlib.import_module(backend_name)
  File "/home/cyrus/intel/intelpython3/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/cyrus/intel/intelpython3/lib/python3.6/site-packages/matplotlib/backends/backend_webagg.py", line 28, in
 <module>
    raise RuntimeError("The WebAgg backend requires Tornado.")
RuntimeError: The WebAgg backend requires Tornado.
 

I have installed Tornado through apt-get install python-tornado but the error still remains.

I am somewhat new to linux so I maybe missing something trival...

Can anyone suggest a way to fix this? 

Thanks in advance.

0 Kudos
1 Reply
Oleksandr_P_Intel
2,052 Views

Intel distribution for Python does not ship tornado for various reasons. 

You should be able to install tornado from the main channel using "conda install tornado".

Should it not be possible to install Tornado, please change the backend used by matplotlib to one in "matplotlib.rcsetup.all_backends" using

import matplotlib as mpl
mpl.use(preferred_backend)

 

Reply