biosig python3 - Ошибка сегментации (дамп ядра)

Я пытаюсь установить Biosig для python3, но у меня возникает следующая ошибка:

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

У меня Linux Mint 19 Tara и Python 3.7.5

Я установил его с помощью:

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)

а также компилируем исходный код:

make python
make -C biosig4c++/python build
make -C biosig4c++/python release

pip3 install biosig4c++/python/dist/Biosig-2.0.5.tar.gz

обе одинаковые ошибки:

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)

Пробую отлаживать:

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)

Устанавливаю рекомендуемые пакеты:

--- Рекомендуемые пакеты во время выполнения ---

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

Я также установил libbiosig-dev

странно то, что biosig работает на python2

Устраняю проблему:

sudo pip2 удалить biosig sudo pip3 удалить biosig sudo apt-get удалить biosig-dev biosig1

и переустановите./configure && make && make install

1 ответ

Добро пожаловать в Stackru! В biosig Пакет Python зависит от скомпилированного C / C++ libbiosig. Вы можете сначала установить это (например, с помощью диспетчера пакетов), а затем повторить попытку pip install команда.

apt-get update
apt-get install libbiosig-dev  # Answer yes to install
python3 -m pip install --no-cache-dir https://pub.ist.ac.at/~schloegl/biosig/prereleases/Biosig-2.0.6.tar.gz
python3 -c 'import biosig'  # Test that import works

Я не уверен libbiosig-dev доступен в Linux Mint, но доступен в Debian (на котором основан Mint).

Другие вопросы по тегам