pmorissette / ffn

ffn - a financial function library for Python
pmorissette.github.io/ffn
MIT License
1.94k stars 291 forks source link

Cannot import ffn for matplotlib.use removed warn #101

Closed Poeticphysicist closed 3 years ago

Poeticphysicist commented 4 years ago

From ffn core scripts, we should import matplotlib first as : """ if 'DISPLAY' not in os.environ: matplotlib.use('agg', warn=False) """ But "warn=False" has been removed... So error occurred.

r0f1 commented 3 years ago

Workaround:

os.environ["DISPLAY"] = ""
import ffn
eervin123 commented 3 years ago

Thank you this is helpful, @r0f1

timkpaine commented 3 years ago

closing as there is a workaround. the justification for this is provided # avoid pyplot import failure in headless environment, PRs welcome for a better/more permanent workaround.