mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

ImportError: cannot import name 'tqdm' from 'mne.externals'

Open xiaohao-lin1 opened this issue 1 year ago • 6 comments

Describe the bug

ImportError: cannot import name 'tqdm' from 'mne.externals' (D:\Users\SCSE-AI.R-CIL1\anaconda3\envs\MoBI_py3.8\lib\site-packages\mne\externals_init_.py)

Steps to reproduce

I was using the autoreject package, which calls upon the MNE package, and encountered this error. from autoreject import AutoReject ar = AutoReject() epochs_clean = ar.fit_transform(epochs)

File "D:\Users\SCSE-AI.R-CIL1\anaconda3\envs\MoBI_py3.8\lib\site-packages\mne\utils\progressbar.py", line 49, in init import tqdm ImportError: cannot import name 'tqdm' from 'mne.externals' (D:\Users\SCSE-AI.R-CIL1\anaconda3\envs\MoBI_py3.8\lib\site-packages\mne\externals_init_.py)

Expected results

Replace this text with a description of what you expected to happen.

Actual results

Replace this text with the actual output, traceback, screenshot, or other description of the results.

Additional information

mne.sys_info() D:\Users\SCSE-AI.R-CIL1\anaconda3\envs\MoBI_py3.8\lib\site-packages\cupy_environment.py:213: UserWarning: CUDA path could not be detected. Set CUDA_PATH environment variable if CuPy fails to load. warnings.warn( 2022-07-24 18:22:58,965 - numexpr.utils - INFO - Note: NumExpr detected 16 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8. 2022-07-24 18:22:58,976 - numexpr.utils - INFO - NumExpr defaulting to 8 threads. Platform: Windows-10-10.0.22000-SP0 Python: 3.8.12 (default, Oct 12 2021, 03:01:40) [MSC v.1916 64 bit (AMD64)] Executable: D:\Users\SCSE-AI.R-CIL1\anaconda3\envs\MoBI_py3.8\python.exe CPU: Intel64 Family 6 Model 165 Stepping 5, GenuineIntel: 16 cores Memory: 31.7 GB

mne: 0.24.0 numpy: 1.21.2 {blas=mkl_rt, lapack=mkl_rt} sklearn: 1.0.1 numba: 0.55.2 nibabel: 4.0.1 nilearn: 0.9.1 dipy: 1.5.0 cupy: 9.6.0 pandas: 1.3.4 mayavi: Not found pyvista: Not found pyvistaqt: Not found ipyvtklink: 0.2.2 vtk: 9.0.3 PyQt5: 5.9.2 ipympl: Not found mne_qt_browser: 0.3.1

xiaohao-lin1 avatar Jul 24 '22 05:07 xiaohao-lin1

Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴🏽‍♂️

welcome[bot] avatar Jul 24 '22 05:07 welcome[bot]

Can you post the output of mne.sys_info() please? It seems like you are using an old version, because tqdm has been removed from mne.externals.

cbrnr avatar Jul 24 '22 08:07 cbrnr

You need to update the autoreject package

This issue has been fixed a few months ago

agramfort avatar Jul 24 '22 09:07 agramfort

Can you post the output of mne.sys_info() please? It seems like you are using an old version, because tqdm has been removed from mne.externals.

Hi I have updated mne.sys_info() in the post

xiaohao-lin1 avatar Jul 24 '22 10:07 xiaohao-lin1

You need to update the autoreject package This issue has been fixed a few months ago

Hi I am currently using autoreject version 0.4.dev0.

I have tried using the stable release of 0.3.1 too, but I encountered the same issue. I am using mne mne: 0.24.0

xiaohao-lin1 avatar Jul 24 '22 10:07 xiaohao-lin1

Can you upgrade mne? The latest version is 1.0.3, and this includes tqdm as a dependency.

cbrnr avatar Jul 24 '22 10:07 cbrnr

I think this has been fixed and is an old MNE/autoreject issue

larsoner avatar Sep 15 '22 17:09 larsoner