System information:
mne-python main ? venv took 4s
✗ mne sys_info
Platform Linux-6.18.2-arch2-1-x86_64-with-glibc2.42
Python 3.11.14 (main, Dec 17 2025, 21:07:37) [Clang 21.1.4 ]
Executable /home/himan/Projects/oss-mne/mne-python/venv/bin/python3
CPU 12th Gen Intel(R) Core™ i5-12450H (12 cores)
Memory 15.3 GiB
Core
├☑ mne 1.11.0 (unable to check for latest version on GitHub, timeout after 2.0 sec)
├☑ numpy 2.4.0 (OpenBLAS 0.3.30 with 12 threads)
├☑ scipy 1.16.3
└☑ matplotlib 3.10.8 (backend=qtagg)
Numerical (optional)
├☑ sklearn 1.8.0
├☑ nibabel 5.3.3
├☑ dipy 1.11.0
├☑ pandas 2.3.3
├☑ h5py 3.15.1
└☐ unavailable numba, nilearn, openmeeg, cupy, h5io
Visualization (optional)
├☑ pyvista 0.46.4 (OpenGL 4.5.0 NVIDIA 590.48.01 via NVIDIA GeForce RTX 4050 Laptop GPU/PCIe/SSE2)
├☑ pyvistaqt 0.11.3
├☑ vtk 9.5.2
QApplication: invalid style override ‘kvantum’ passed, ignoring it.
Available styles: Windows, Fusion
├☑ qtpy 2.4.3 (PySide6=6.10.1)
├☑ pyqtgraph 0.14.0
├☑ mne-qt-browser 0.7.4
└☐ unavailable ipympl, ipywidgets, trame_client, trame_server, trame_vtk, trame_vuetify
Ecosystem (optional)
├☑ mne-connectivity 0.5.0
├☑ eeglabio 0.1.2
├☑ edfio 0.4.11
├☑ pybv 0.7.6
└☐ unavailable mne-bids, mne-nirs, mne-features, mne-icalabel, mne-bids-pipeline, neo, curryreader, mffpy, antio, defusedxml
mne-python main ? venv took 5s
❯
I don’t know what causes this error(s) but when I download a clean clone of the project for the first time, and run tests, they all work fine, but suddenly, I don’t know what causes this, the tests fail, giving module not found or some property/method not found error due to updates in newer versions of deps like numpy. Though this was not the case when the installation was clean.
Now once this error has occured, it won’t go even after nuking everything - uv cache, pip cache, pytest cache and all. Can anybody give me an idea of what’s going on here:
mne-python main ? venv took 31s
❯ pytest mne
================================================================== test session starts ===================================================================
platform linux – Python 3.11.14, pytest-9.0.2, pluggy-1.6.0
PySide6 6.10.1 – Qt runtime 6.10.1 – Qt compiled 6.10.1
MNE 1.11.0 – /home/himan/Projects/oss-mne/mne-python/mne
rootdir: /home/himan/Projects/oss-mne/mne-python
configfile: pyproject.toml
plugins: anyio-4.12.0, cov-7.0.0, qt-4.5.0, timeout-2.4.0, rerunfailures-16.1
collected 6144 items / 2 errors / 10 skipped
========================================================================= ERRORS =========================================================================
_______________________________________________ ERROR collecting mne/io/neuralynx/tests/test_neuralynx.py ________________________________________________
mne/io/neuralynx/tests/test_neuralynx.py:21: in
pytest.importorskip(“neo”)
venv/lib/python3.11/site-packages/neo/init.py:15: in
from neo.core import *
venv/lib/python3.11/site-packages/neo/core/init.py:35: in
from neo.core.block import Block
venv/lib/python3.11/site-packages/neo/core/block.py:12: in
from neo.core.container import Container, unique_objs
venv/lib/python3.11/site-packages/neo/core/container.py:13: in
from neo.core.spiketrain import SpikeTrain
venv/lib/python3.11/site-packages/neo/core/spiketrain.py:24: in
import quantities as pq
venv/lib/python3.11/site-packages/quantities/init.py:275: in
from . import quantity
venv/lib/python3.11/site-packages/quantities/quantity.py:113: in
class Quantity(np.ndarray):
venv/lib/python3.11/site-packages/quantities/quantity.py:632: in Quantity
@with_doc(np.ndarray.ptp)
^^^^^^^^^^^^^^
E AttributeError: type object ‘numpy.ndarray’ has no attribute ‘ptp’
_______________________________________________ ERROR collecting mne/io/neuralynx/tests/test_neuralynx.py ________________________________________________
mne/io/neuralynx/tests/test_neuralynx.py:21: in
pytest.importorskip(“neo”)
venv/lib/python3.11/site-packages/neo/init.py:15: in
from neo.core import *
venv/lib/python3.11/site-packages/neo/core/init.py:35: in
from neo.core.block import Block
venv/lib/python3.11/site-packages/neo/core/block.py:12: in
from neo.core.container import Container, unique_objs
venv/lib/python3.11/site-packages/neo/core/container.py:13: in
from neo.core.spiketrain import SpikeTrain
venv/lib/python3.11/site-packages/neo/core/spiketrain.py:24: in
import quantities as pq
venv/lib/python3.11/site-packages/quantities/init.py:275: in
from . import quantity
venv/lib/python3.11/site-packages/quantities/quantity.py:113: in
class Quantity(np.ndarray):
venv/lib/python3.11/site-packages/quantities/quantity.py:632: in Quantity
@with_doc(np.ndarray.ptp)
^^^^^^^^^^^^^^
E AttributeError: type object ‘numpy.ndarray’ has no attribute ‘ptp’
------------------------------------- generated xml file: /home/himan/Projects/oss-mne/mne-python/junit-results.xml --------------------------------------
================================================================ short test summary info =================================================================
ERROR mne/io/neuralynx/tests/test_neuralynx.py - AttributeError: type object ‘numpy.ndarray’ has no attribute ‘ptp’
ERROR mne/io/neuralynx/tests/test_neuralynx.py - AttributeError: type object ‘numpy.ndarray’ has no attribute ‘ptp’
SKIPPED [1] venv/lib/python3.11/site-packages/_pytest/doctest.py:551: unable to import module PosixPath(‘/home/himan/Projects/oss-mne/mne-python/mne/_edf/
open.py’)
SKIPPED [2] mne/io/ant/tests/test_ant.py:20: could not import ‘antio’: No module named ‘antio’
SKIPPED [2] mne/io/curry/tests/test_curry.py:33: could not import ‘curryreader’: No module named ‘curryreader’
SKIPPED [2] mne/io/fieldtrip/tests/test_fieldtrip.py:53: could not import ‘pymatreader’: No module named ‘pymatreader’
SKIPPED [2] mne/io/nedf/tests/test_nedf.py:32: could not import ‘defusedxml’: No module named ‘defusedxml’
SKIPPED [1] venv/lib/python3.11/site-packages/_pytest/doctest.py:551: unable to import module PosixPath(‘/home/himan/Projects/oss-mne/mne-python/mne/viz/b
ackends/_notebook.py’)
!!! Interrupted: 2 errors during collection !!!
============================================================= 10 skipped, 2 errors in 2.61s ==============================================================
I know that the fixing of these errors is simple by looking at the error traceback - I just have to install a particular numpy version, defusedxml and other deps listed in the error stack. But even that doesn’t help, every fix leads to another error or failure of tests.
There’s someting else going on here than just - module not found, or particular version conflict?