PIA-Group / BioSPPy

Biosignal Processing in Python
Other
573 stars 274 forks source link

Segmentation Fault in IDLE or CLI #49

Closed Xiaohong-Deng closed 5 years ago

Xiaohong-Deng commented 5 years ago

The following scenarios are all in conda virtual environment

Simplest reproducible scenarios

Run the script in command line python hello.py

import biosppy

if __name__ == '__main__':
    print("hello")

or in IDLE

>>> import biosppy

In jupyter notebook it works fine. Any idea why it's the case?

capcarr commented 5 years ago

Hi @Xiaohong-Deng

Can you show the exact error message that you get? And the Python version you're using? I'm assuming that in all cases you're pointing to the same conda environment, right?

Xiaohong-Deng commented 5 years ago

Resolved. It's long existing issue between Qt5 and matplotlib. Before import biosppy first

    import matplotlib as mpl
    mpl.use('TkAgg')
    from matplotlib import pyplot as plt

I should have known it because I encountered this before.