Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when importing qp version 0.7.1 with scipy 1.7.3 #131

Open
DManowitz opened this issue Nov 30, 2022 · 2 comments
Open

Error when importing qp version 0.7.1 with scipy 1.7.3 #131

DManowitz opened this issue Nov 30, 2022 · 2 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@DManowitz
Copy link

When I try to import qp, I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\...\lib\site-packages\qp\__init__.py", line 6, in <module>
    from .spline_pdf import *
  File "C:\...\lib\site-packages\qp\spline_pdf.py", line 11, in <module>
    from qp.pdf_gen import Pdf_rows_gen
  File "C:\...\lib\site-packages\qp\pdf_gen.py", line 24, in <module>
    from scipy.stats._distn_infrastructure import rv_continuous_frozen
ImportError: cannot import name 'rv_continuous_frozen' from 'scipy.stats._distn_infrastructure' (C:\...\lib\site-packages\scipy\stats\_distn_infrastructure.py)

I have qp 0.7.1 and scipy 1.7.3 installed. I have verified this error in both Python 3.7 and Python 3.8.

@sschmidt23
Copy link
Collaborator

I think the requirements.txt for qp is just out of date, and we should really have scipy>=1.9, same as what we have in RAIL (which effectively means python>=3.8 since scipy stopped supporting python 3.7 for recent releases). It looks like our Github action is grabbing scipy 1.9.3 by default so we did not catch the outdated req. Can someone who has been working on qp more recently confirm this?

@aimalz aimalz added the bug Something isn't working label Nov 30, 2022
@BStoelzner
Copy link
Collaborator

Possibly related to this error, the code in mixmod_examples.ipynb throws an error when calling the qp.convert function. This seems to be related to the scipy rv_frozen.rvs method. I'm running python 3.11 and scipy 1.11.1.
See here: https://gist.github.com/BStoelzner/a87e6cd6b75171c852361b0f44ee0849

@aimalz aimalz added documentation Improvements or additions to documentation good first issue Good for newcomers labels Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants