Hi,
installing PyRAT in a conda environment fails with an error message from Matplotlib.
Steps to reproduce:
clone this repository
create a new conda environment with conda env create -n pyratenv -f requirements.txt
activate the environment conda activate pyratenv
run python setup.py install --user
Expected Result:
The installation succeeds without any error.
Actual Result:
The installation fails, printing the following lines:
INFO: LeeSigma cython module not found. (run build process?)
INFO: LeeSigma2 cython module not found. (run build process?)
INFO: N-Dimensional Beltrami cython modules not found. (run build process?)
INFO: Bilateral module not found. (run build process?)
INFO: SRAD cython module not found. (run build process?)
INFO: EMDES cython module not found. (run build process?)
INFO: IDANQ cython module not found. (run build process?)
DEBUG: Loaded backend Qt5Agg version unknown.
Traceback (most recent call last):
File "setup.py", line 9, in <module>
import pyrat.lib.nlsar.nlsetup as nlsetup
File "/home/user/Documents/PyRAT/pyrat/__init__.py", line 105, in <module>
from . import filter
File "/home/user/Documents/PyRAT/pyrat/filter/__init__.py", line 8, in <module>
from .Spectrum import *
File "/home/user/Documents/PyRAT/pyrat/filter/Spectrum.py", line 10, in <module>
from pyrat.filter import Unweight
File "/home/user/Documents/PyRAT/pyrat/filter/Unweight.py", line 2, in <module>
matplotlib.use('Qt5Agg')
File "/home/user/.local/share/anaconda3/envs/pyratenv/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py", line 307, in wrapper
return func(*args, **kwargs)
File "/home/user/.local/share/anaconda3/envs/pyratenv/lib/python3.7/site-packages/matplotlib/__init__.py", line 1297, in use
switch_backend(name)
File "/home/user/.local/share/anaconda3/envs/pyratenv/lib/python3.7/site-packages/matplotlib/pyplot.py", line 230, in switch_backend
newbackend, required_framework, current_framework))
ImportError: Cannot load backend 'Qt5Agg' which requires the 'qt5' interactive framework, as 'headless' is currently running
I've taken a look into what is causing this and found the following line to be the source of the error:
This error is related to matplotlib, not PyRAT. You need to configure to use the qt5 backend, which is pretty much standard nowadays. You'll run into trobles if you remove this line, since pyplot is used in some places.
Hi,
installing PyRAT in a conda environment fails with an error message from Matplotlib.
Steps to reproduce:
conda env create -n pyratenv -f requirements.txt
conda activate pyratenv
python setup.py install --user
Expected Result:
The installation succeeds without any error.
Actual Result:
The installation fails, printing the following lines:
I've taken a look into what is causing this and found the following line to be the source of the error:
PyRAT/pyrat/__init__.py
Line 101 in b366c10
Removing this import lets the installation complete successfully.
The text was updated successfully, but these errors were encountered: