ubicomplab / rPPG-Toolbox

rPPG-Toolbox: Deep Remote PPG Toolbox (NeurIPS 2023)
https://arxiv.org/abs/2210.00716
Other
503 stars 127 forks source link

ImportError: cannot import name '_iterative' from partially initialized module 'scipy.sparse.linalg.isolve' (most likely due to a circular import) (D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py) #258

Closed dglzj closed 7 months ago

dglzj commented 8 months ago

Traceback (most recent call last): File "D:\rppg_toolbox\main_run.py", line 10, in from dataset import data_loader File "D:\rppg_toolbox\dataset\data_loader__init.py", line 1, in import dataset.data_loader.BaseLoader File "D:\rppg_toolbox\dataset\data_loader\BaseLoader.py", line 13, in from scipy import signal File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy__init.py", line 189, in getattr return _importlib.import_module(f'scipy.{name}') File "D:\Anaconda\envs\rppg-toolbox\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\signal__init__.py", line 311, in from . import _sigtools, windows File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\signal\windows__init__.py", line 42, in from ._windows import * File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\signal\windows_windows.py", line 7, in from scipy import linalg, special, fft as sp_fft File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\init.py", line 189, in getattr return _importlib.import_module(f'scipy.{name}') File "D:\Anaconda\envs\rppg-toolbox\lib\importlib\init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\linalg\init__.py", line 225, in from ._sketches import * File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\linalg_sketches.py", line 9, in from scipy.sparse import csc_matrix File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\sparse\init.py", line 287, in from . import csgraph File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\sparse\csgraph\init__.py", line 185, in from ._laplacian import laplacian File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\sparse\csgraph_laplacian.py", line 7, in from scipy.sparse.linalg import LinearOperator File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\sparse\linalg\init.py", line 130, in from . import isolve, dsolve, interface, eigen, matfuncs File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\sparse\linalg\isolve\init.py", line 4, in from .iterative import * File "D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 8, in from . import _iterative ImportError: cannot import name '_iterative' from partially initialized module 'scipy.sparse.linalg.isolve' (most likely due to a circular import) (D:\Anaconda\envs\rppg-toolbox\lib\site-packages\scipy\sparse\linalg\isolve\init__.py)

I installed the environment according to the requirements file, but I get an error, how to solve it?thanks

yahskapar commented 7 months ago

Hi @dglzj,

Are you still running into this issue? Have you tried manually reinstalling scipy using pip uninstall and then reinstalling with pip install? You can also try pip --upgrade install to see if updating any of the dependencies may help resolve the issue.

Unfortunately, I haven't been able to reproduce this issue on my end. If you're still running into this and the above advice hasn't helped, let us know of some more information, specifically:

  1. What operating system are you on?
  2. Are you using a conda environment and following the setup instructions here? You mentioned you used the requirements file but it's not clear if you're doing this in a conda environment or not.
  3. Can you confirm your Python version? You should be able to do this with python --version.
  4. Can you copy/paste the output of pip list?

Thanks,

Akshay

yahskapar commented 7 months ago

Hi @dglzj,

Given it's been two weeks since this issue has been active, I'll go ahead and close it. In case you are still encountering this issue, please feel free to comment again and we can look into it together.

Best regards,

Akshay