prmiles / pymcmcstat

Python implementation of MATLAB toolbox "mcmcstat"
https://github.com/prmiles/pymcmcstat/wiki
MIT License
70 stars 10 forks source link

Import Error #100

Open mcekwonu opened 1 month ago

mcekwonu commented 1 month ago

Describe the bug pymcmcstat version >= 1.9.0, 1.9.1 failed to import pi from scipy when import pymcmcstat is called.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'python IDE'
  2. import pymcmcstat
  3. See error: Traceback (most recent call last): File "", line 1, in File "/home/drmce/.drmce_venv/lib/python3.11/site-packages/pymcmcstat/init.py", line 3, in from mcmcplot import mcmcplot # noqa, flake8 issue ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/drmce/.drmce_venv/lib/python3.11/site-packages/mcmcplot/mcmcplot.py", line 9, in from . import mcmatplot as _mcmpl File "/home/drmce/.drmce_venv/lib/python3.11/site-packages/mcmcplot/mcmatplot.py", line 13, in from .utilities import generate_names, make_x_grid File "/home/drmce/.drmce_venv/lib/python3.11/site-packages/mcmcplot/utilities.py", line 9, in from scipy import pi, sin, cos ImportError: cannot import name 'pi' from 'scipy' (/home/drmce/.drmce_venv/lib/python3.11/site-packages/scipy/init.py)

Expected behavior import pymcmcstat.

Desktop (please complete the following information):

Radron74 commented 2 weeks ago

Pymcmcstat do not work with the latest version of scipy 1.14.1, try replacing from scipy import pi, sin, cos by from math import pi, sin, cos