AttributeError: /usr/lib64/libmagic.so.1: undefined symbol: magic_list
##Comman git clone https://github.com/Kukuster/SumStatsRehab.git && cd SumStatsRehab pip install -r requirements.txt python3 setup.py build python3 setup.py install SumStatsRehab --help
##Bug
SumStatsRehab]$ SumStatsRehab --help
Traceback (most recent call last):
File "/xxx/software/miniconda3/bin/SumStatsRehab", line 33, in
I reproduced the issue on fresh Ubuntu 20.04.1 Docker image, with miniconda 24.3.0, python 3.10.12.
We will have to make an update. But for now, I recommend the following steps to fix your issue:
1) Manually change the requirements for scipy version in both requirements.txt and setup.py files
from: scipy==1.6.1
to: scipy==1.10.1
2) Install system package libmagic and/or reinstall python package python-magic. Depending on your system [R], run:
Debian-based Linux
pip uninstall python-magic
apt install libmagic1 -y
pip install -r requirements.txt # will reinstall python-magic and scipy
MacOS
pip uninstall python-magic
brew install libmagic
pip install -r requirements.txt # will reinstall python-magic and scipy
Windows
pip uninstall python-magic
pip install -r requirements.txt # will reinstall python-magic and scipy
pip install python-magic-bin
3) Reinstall SumStatsRehab:
python3 setup.py build
python3 setup.py install
After this SumStatsRehab --help should work.
scipy update will not affect the functionality: we rely only on normal distribution (scipy.stats.norm), and it was not changed between these versions according to the scipy release notes.