lux-org/lux

Lux cannot import 'bmat' from SciPy

SimonCrouzet opened this issue · 0 comments

Hello everyone,

Thanks for your work on the package!

I am encountering a problem when I am trying to import lux v0.5.1:

>>> import lux

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[1], line 3
      1 import numpy as np
      2 import pandas as pd
----> 3 import lux

File [c:\ProgramData\Anaconda3\envs\dla\lib\site-packages\lux\__init__.py:29](file:///C:/ProgramData/Anaconda3/envs/dla/lib/site-packages/lux/__init__.py:29)
     25 config = Config()
     27 from lux.action.default import register_default_actions
---> 29 register_default_actions()

File [c:\ProgramData\Anaconda3\envs\dla\lib\site-packages\lux\action\default.py:3](file:///C:/ProgramData/Anaconda3/envs/dla/lib/site-packages/lux/action/default.py:3), in register_default_actions()
      1 def register_default_actions():
      2     import lux
----> 3     from lux.action.custom import custom
      4     from lux.action.correlation import correlation
      5     from lux.action.univariate import univariate

File [c:\ProgramData\Anaconda3\envs\dla\lib\site-packages\lux\action\custom.py:15](file:///C:/ProgramData/Anaconda3/envs/dla/lib/site-packages/lux/action/custom.py:15)
      1 #  Copyright 2019-2020 The Lux Authors.
      2 #
      3 #  Licensed under the Apache License, Version 2.0 (the "License");
   (...)
     12 #  See the License for the specific language governing permissions and
...
---> 25 from scipy.sparse.sputils import bmat
     27 __all__ = ['lobpcg']
     30 def _report_nonhermitian(M, name):

ImportError: cannot import name 'bmat' from 'scipy.sparse.sputils' ([c:\ProgramData\Anaconda3\envs\dla\lib\site-packages\scipy\sparse\sputils.py](file:///C:/ProgramData/Anaconda3/envs/dla/lib/site-packages/scipy/sparse/sputils.py))

An issue in an other package is mentioning the same problem. It seems to come from a commit within scipy. However, it's strange because I have scipy v1.4.1 (which I tried to update but it's apparently not possible, and I think only lux is requiring it in my local env), and this commit is attached to scipy v1.10.1.

Wishing you a pleasant day,
Best,