Menu

Home

Alois Schloegl

BioSig is a software library for processing of biomedical signals (EEG, ECG, etc.) with Matlab, Octave, C/C++ and Python. A standalone signal viewer supporting more than 30 different data formats is also provided.

  1. Installation
  2. Usage
  3. FAQ


Project Admins:


Related

Wiki: FAQ
Wiki: Installation
Wiki: Usage

Discussion

  • Nahuel

    Nahuel - 2020-10-06

    I am trying to install Biosig for python3 but I have the following error:

    nahuel@nahuel-Notebook:~/Documents/TESIS/biosig-2.0.6$ python3 -c "import biosig"
    Segmentation fault (core dumped)
    

    I have Linux Mint 19 Tara and Python 3.7.5

    I installed it with:

    nahuel@nahuel-Notebook:~$ python3 -m pip install --no-cache-dir https://pub.ist.ac.at/~schloegl/biosig/prereleases/Biosig-2.0.6.tar.gz
    Defaulting to user installation because normal site-packages is not writeable
    Collecting https://pub.ist.ac.at/~schloegl/biosig/prereleases/Biosig-2.0.6.tar.gz
      Downloading https://pub.ist.ac.at/~schloegl/biosig/prereleases/Biosig-2.0.6.tar.gz (5.4 kB)
    Requirement already satisfied (use --upgrade to upgrade): Biosig==2.0.6 from https://pub.ist.ac.at/~schloegl/biosig/prereleases/Biosig-2.0.6.tar.gz in ./.local/lib/python3.7/site-packages
    Requirement already satisfied: numpy in ./.local/lib/python3.7/site-packages (from Biosig==2.0.6) (1.19.0)
    Requirement already satisfied: setuptools>=6.0 in ./.local/lib/python3.7/site-packages (from Biosig==2.0.6) (50.3.0)
    Building wheels for collected packages: Biosig
      Building wheel for Biosig (setup.py) ... done
      Created wheel for Biosig: filename=Biosig-2.0.6-cp37-cp37m-linux_x86_64.whl size=20899 sha256=a544649cda0a37de134b7dd6ed8dc1b801343589fbfef38d8cebab119e8e7c64
      Stored in directory: /tmp/pip-ephem-wheel-cache-n7_nrhbm/wheels/09/43/21/972277ad502204398daed7cc76fbdecacbc3a66afeee8f8a94
    Successfully built Biosig
    nahuel@nahuel-Notebook:~$ python3 -c "import biosig"
    Segmentation fault (core dumped)
    

    and also compiling the source code:

    make python
    make -C biosig4c++/python build
    make -C biosig4c++/python release
    
    pip3 install biosig4c++/python/dist/Biosig-2.0.5.tar.gz
    

    both the same error:

    nahuel@nahuel-Notebook:~/Documents/TESIS/biosig-2.0.6$ python3 -v -c "import biosig"
    import _frozen_importlib # frozen
    import _imp # builtin
    import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
    import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
    import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
    # installing zipimport hook
    import 'zipimport' # <class '_frozen_importlib.BuiltinImporter'>
    # installed zipimport hook
    import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
    import '_io' # <class '_frozen_importlib.BuiltinImporter'>
    import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
    import 'posix' # <class '_frozen_importlib.BuiltinImporter'>
    import _thread # previously loaded ('_thread')
    import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
    import _weakref # previously loaded ('_weakref')
    import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
    ...
    ...
    ...
    import 'fcntl' # <class '_frozen_importlib.BuiltinImporter'>
    import 'apt.progress.base' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa99f098dd0>
    import 'apt.progress.text' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa99f08bc10>
    import 'apt.package' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa99f320b50>
    # /usr/lib/python3/dist-packages/apt/__pycache__/cache.cpython-37.pyc matches /usr/lib/python3/dist-packages/apt/cache.py
    # code object from '/usr/lib/python3/dist-packages/apt/__pycache__/cache.cpython-37.pyc'
    import 'apt.cache' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa99f328550>
    # /usr/lib/python3/dist-packages/apt/__pycache__/cdrom.cpython-37.pyc matches /usr/lib/python3/dist-packages/apt/cdrom.py
    # code object from '/usr/lib/python3/dist-packages/apt/__pycache__/cdrom.cpython-37.pyc'
    import 'apt.cdrom' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa99f098bd0>
    Segmentation fault (core dumped)
    

    I try debug:

    nahuel@nahuel-Notebook:~/Documents/TESIS/bcitp$ python -Xfaulthandler -c "import biosig"
    Fatal Python error: Segmentation fault
    
    Current thread 0x00007f20bce4e740 (most recent call first):
      File "/usr/lib/python3/dist-packages/apt/__init__.py", line 34 in <module>
      File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
      File "<frozen importlib._bootstrap_external>", line 728 in exec_module
      File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
      File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 983 in _find_and_load
      File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24 in <module>
      File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
      File "<frozen importlib._bootstrap_external>", line 728 in exec_module
      File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
      File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 983 in _find_and_load
      File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23 in <module>
      File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
      File "<frozen importlib._bootstrap_external>", line 728 in exec_module
      File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
      File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 983 in _find_and_load
      File "/usr/lib/python3/dist-packages/apport/report.py", line 30 in <module>
      File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
      File "<frozen importlib._bootstrap_external>", line 728 in exec_module
      File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
      File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 983 in _find_and_load
      File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5 in <module>
      File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
      File "<frozen importlib._bootstrap_external>", line 728 in exec_module
      File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
      File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 983 in _find_and_load
      File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 953 in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 983 in _find_and_load
      File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72 in apport_excepthook
    Segmentation fault (core dumped)
    

    I install the recommended packages:

    --- Recommended packages at runtime ---

    sudo apt-get install libb64 tinyxml python-numpy python3-numpy R openjdk-11-jre octave octave-tsa octave-nan

    E: Unable to locate package libb64 #but install libb64-dev
    E: Unable to locate package tinyxml #but install libtinyxml-dev
    E: Unable to locate package R #not installed
    I also installed libbiosig-dev

    something strange is that biosig works in python2

     
  • Alois Schloegl

    Alois Schloegl - 2020-10-06

    To install biosig - including python3 binding - from source, you need to use the compile time prerequisites, If you are interested only in the python bindings (not Octave, Java, R, python2), these should be sufficient.

    apt-get install \
        gawk \
        libb64-dev tinyxml-dev \
        python3-numpy \
        libpython3-dev 
    

    After downloading and decompression of
    http://sourceforge.net/projects/biosig/files/BioSig%20for%20C_C%2B%2B/src/biosig-2.0.6.src.tar.gz

    you need to run:

    ./configure && make && sudo make install 
    

    That should do it. ( I did not test this on Mint, but on Debian).

     

    Last edit: Alois Schloegl 2020-10-06

Log in to post a comment.