Latest version of seaborn removed six
The 0.10.0 release of seaborn dropped python 2 support after it reached end-of-life at the end of last year. As part of this, it looks like they removed internal uses of six
.
This is causing failures in the violin plots, see trace below.
If pesummary
plans to continue to support python 2 we can switch to using the free-standing six
package, https://six.readthedocs.io/. Alternatively, we could also discontinue python 2 support and remove all six
and __future__
imports.
@charlie.hoy do you have a preferred method? I'm happy to implement the change.
04:08 bilby_pipe INFO : Running command: /opt/conda/envs/python37/bin/summarypages --webdir test_outdir/results_page --email albert.einstein@ligo.org --config test_pesummary.ini --samples test_outdir/result/label_data0_0_analysis_H1L1_dynesty_result.json -a IMRPhenomPv2 --gwdata test_outdir/data/label_data0_0_generation_data_dump.pickle
Traceback (most recent call last):
File "/opt/conda/envs/python37/bin/summarypages", line 10, in <module>
sys.exit(main())
File "/opt/conda/envs/python37/lib/python3.7/site-packages/pesummary/cli/summarypages.py", line 190, in main
from .summaryplots import PlotGeneration
File "/opt/conda/envs/python37/lib/python3.7/site-packages/pesummary/cli/summaryplots.py", line 23, in <module>
from pesummary.gw.plots.main import _PlotGeneration
File "/opt/conda/envs/python37/lib/python3.7/site-packages/pesummary/gw/plots/main.py", line 31, in <module>
from pesummary.gw.plots import publication
File "/opt/conda/envs/python37/lib/python3.7/site-packages/pesummary/gw/plots/publication.py", line 22, in <module>
from pesummary.gw.plots import violin
File "/opt/conda/envs/python37/lib/python3.7/site-packages/pesummary/gw/plots/violin.py", line 30, in <module>
from seaborn.external.six import string_types
ModuleNotFoundError: No module named 'seaborn.external.six'
Related bilby_pipe issue bilby_pipe#155 (closed)
UPDATE:
Six appears to be used three times, once from six
and twice from seaborn.external.six
pesummary/core/plots/kde.py:from six import string_types
pesummary/gw/plots/violin.py:from seaborn.external.six import string_types
pesummary/gw/plots/violin.py:from seaborn.external.six.moves import range
There also only seems to be one __future__
import
pesummary/gw/plots/violin.py:from __future__ import division
If we remove python 2 support, we can just test that something is a str
rather than using string_types
.