Closed jasminetan6032 closed 3 years ago
@jasminetan6032 is attending the Pybrain 2020 workshop on MNE and was having this issue today. I couldn't resolve it via a screenshare. I am wondering if it's related to Python 3.8 on Windows? We wanted to give source estimation a go tomorrow so it would be great if anyone had an idea on what we could do
cc @GuillaumeFavelier
I couldn't resolve it via a screenshare.
What did you try @hoechenberger ?
@jasminetan6032 could you share the output of:
python -c "import mne; mne.sys_info()"
What did you try @hoechenberger ?
mne.viz.set_3d_backend('pyvista')
MNE was installed by using the environment.yml
from the MNE installation instructions
(base) C:\Users\jasmine>mne sys_info Platform: Windows-7-6.1.7601-SP1 Python: 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64) ] Executable: c:\users\jasmine\anaconda3\python.exe CPU: Intel64 Family 6 Model 158 Stepping 9, GenuineIntel: 8 cores Memory: 32.0 GB
mne: 0.21.1 numpy: 1.16.2 {blas=mkl_rt, lapack=mkl_rt} scipy: 1.2.1 matplotlib: 3.0.3 {backend=Qt5Agg}
sklearn: 0.20.3 numba: 0.43.1 nibabel: 3.2.0 cupy: Not found pandas: 0.24.2 dipy: 1.3.0 mayavi: Not found pyvista: Not found vtk: Not found
(base) C:\Users\jasmine> python -c "import mne; mne.sys_info()" Platform: Windows-7-6.1.7601-SP1 Python: 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64) ] Executable: C:\Users\jasmine\Anaconda3\python.exe CPU: Intel64 Family 6 Model 158 Stepping 9, GenuineIntel: 8 cores Memory: 32.0 GB
mne: 0.21.1 numpy: 1.16.2 {blas=mkl_rt, lapack=mkl_rt} scipy: 1.2.1 matplotlib: 3.0.3 {backend=Qt5Agg}
sklearn: 0.20.3 numba: 0.43.1 nibabel: 3.2.0 cupy: Not found pandas: 0.24.2 dipy: 1.3.0 mayavi: Not found pyvista: Not found vtk: Not found
(base) C:\Users\jasmine>
Apologies, I ran it in the new environment Richard helped me set up and this happened.
(base) C:\Users\jasmine>conda activate mne-new
(mne-new) C:\Users\jasmine>python -c "import mne; mne.sys_info()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\mne\utils\conf
ig.py", line 544, in sys_info
extra += ' {backend=%s}%s' % (mod.get_backend(), extra)
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\__i
nit__.py", line 1188, in get_backend
return rcParams['backend']
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\__i
nit__.py", line 702, in __getitem__
from matplotlib import pyplot as plt
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\pyp
lot.py", line 2336, in <module>
switch_backend(rcParams["backend"])
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\__i
nit__.py", line 703, in __getitem__
plt.switch_backend(rcsetup._auto_backend_sentinel)
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\pyp
lot.py", line 256, in switch_backend
switch_backend(candidate)
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\pyp
lot.py", line 276, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\pyp
lot.py", line 277, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\importlib\__init__.py", line
127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\bac
kends\backend_qt5agg.py", line 11, in <module>
from .backend_qt5 import (
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\bac
kends\backend_qt5.py", line 16, in <module>
import matplotlib.backends.qt_editor.figureoptions as figureoptions
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\bac
kends\qt_editor\figureoptions.py", line 11, in <module>
from matplotlib.backends.qt_compat import QtGui
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\bac
kends\qt_compat.py", line 170, in <module>
_setup()
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\matplotlib\bac
kends\qt_compat.py", line 75, in _setup_pyqt5
from PyQt5 import QtCore, QtGui, QtWidgets
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\PyQt5\__init__
.py", line 49, in <module>
find_qt()
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\site-packages\PyQt5\__init__
.py", line 44, in find_qt
os.add_dll_directory(dll_dir)
File "C:\Users\jasmine\Anaconda3\envs\mne-new\lib\os.py", line 1109, in add_dl
l_directory
cookie = nt._add_dll_directory(path)
OSError: [WinError 127] The specified procedure could not be found: 'C:\\Users\\
jasmine\\Anaconda3\\envs\\mne-new\\lib\\site-packages\\PyQt5\\Qt\\bin'
(mne-new) C:\Users\jasmine>
I think there is something going on with this installation of PyQt5
🤔
Still on mne-new
, my first idea would be to reinstall PyQt5
, did you try pip install --force --no-cache PyQt5
😅
This is what I use to test my installation:
python -c "from PyQt5.QtWidgets import QApplication, QWidget; app=QApplication([]); w=QWidget(); w.show(); app.exec()"
I did a quick check on my windows 10 (I did my install with pip -r requirements.txt
though). Except that I ran into an issue with the latest numpy (I had to downgrade), I did not reproduce this behaviour. I'll try again later with a proper conda install 👍
Hi Guillaume,
I tried your recommendations and PyQt5 was successfully installed. But when I tested it, this happened.
(mne-new) C:\Users\jasmine>pip install --force --no-cache PyQt5 Collecting PyQt5 Downloading PyQt5-5.15.1-5.15.1-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl (5 9.4 MB) |████████████████████████████████| 59.4 MB 3.3 MB/s Collecting PyQt5-sip<13,>=12.8 Downloading PyQt5_sip-12.8.1-cp38-cp38-win_amd64.whl (63 kB) |████████████████████████████████| 63 kB 4.5 MB/s Installing collected packages: PyQt5-sip, PyQt5 Attempting uninstall: PyQt5-sip Found existing installation: PyQt5-sip 12.8.1 Uninstalling PyQt5-sip-12.8.1: Successfully uninstalled PyQt5-sip-12.8.1 Attempting uninstall: PyQt5 Found existing installation: PyQt5 5.15.1 Uninstalling PyQt5-5.15.1: Successfully uninstalled PyQt5-5.15.1 Successfully installed PyQt5-5.15.1 PyQt5-sip-12.8.1
(mne-new) C:\Users\jasmine>python -c "from PyQt5.QtWidgets import QApplication,
QWidget; app=QApplication([]); w=QWidget(); w.show(); app.exec()"
Traceback (most recent call last):
File "
Thank you so much!
Would it be possible for you to entirely uninstall Anaconda, grab a fresh installer and start from scratch? Maybe there is something wrong with Anaconda on your system
Yeah this looks a bit like https://github.com/conda/conda/issues/9003
The latest installer doesn't work for me (Possibly a Windows 7 problem). I've tried the following installers and I'm still having the same problem.
Anaconda3-2019.03-Windows-x86.exe Anaconda3-2019.10-Windows-x86_64.exe Anaconda3-2020.02-Windows-x86_64.exe
mne sys_info still results in the following error.
(mne) C:\Users\jasmine\mne_environment>mne sys_info
Traceback (most recent call last):
File "c:\users\jasmine\anaconda3\envs\mne\lib\runpy.py", line 194, in _run_mod
ule_as_main
return _run_code(code, main_globals, None,
File "c:\users\jasmine\anaconda3\envs\mne\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\jasmine\anaconda3\envs\mne\Scripts\mne.exe\__main__.py", line 7
, in <module>
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\mne\commands\utils
.py", line 107, in main
cmd.run()
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\mne\commands\mne_s
ys_info.py", line 26, in run
mne.sys_info()
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\mne\utils\config.p
y", line 544, in sys_info
extra += ' {backend=%s}%s' % (mod.get_backend(), extra)
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\__init_
_.py", line 1188, in get_backend
return rcParams['backend']
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\__init_
_.py", line 702, in __getitem__
from matplotlib import pyplot as plt
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\pyplot.
py", line 2336, in <module>
switch_backend(rcParams["backend"])
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\__init_
_.py", line 703, in __getitem__
plt.switch_backend(rcsetup._auto_backend_sentinel)
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\pyplot.
py", line 256, in switch_backend
switch_backend(candidate)
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\pyplot.
py", line 276, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\pyplot.
py", line 277, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "c:\users\jasmine\anaconda3\envs\mne\lib\importlib\__init__.py", line 127
, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\backend
s\backend_qt5agg.py", line 11, in <module>
from .backend_qt5 import (
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\backend
s\backend_qt5.py", line 16, in <module>
import matplotlib.backends.qt_editor.figureoptions as figureoptions
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\backend
s\qt_editor\figureoptions.py", line 11, in <module>
from matplotlib.backends.qt_compat import QtGui
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\backend
s\qt_compat.py", line 170, in <module>
_setup()
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\matplotlib\backend
s\qt_compat.py", line 75, in _setup_pyqt5
from PyQt5 import QtCore, QtGui, QtWidgets
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\PyQt5\__init__.py"
, line 49, in <module>
find_qt()
File "c:\users\jasmine\anaconda3\envs\mne\lib\site-packages\PyQt5\__init__.py"
, line 44, in find_qt
os.add_dll_directory(dll_dir)
File "c:\users\jasmine\anaconda3\envs\mne\lib\os.py", line 1109, in add_dll_di
rectory
cookie = nt._add_dll_directory(path)
OSError: [WinError 127] The specified procedure could not be found: 'c:\\users\\
jasmine\\anaconda3\\envs\\mne\\lib\\site-packages\\PyQt5\\Qt\\bin'
And the jupyter notebook "Compute evoked ERS source power using DICS, LCMV beamformer, and dSPM" still produces the same error at the last cell.
The latest installer doesn't work for me (Possibly a Windows 7 problem).
Mmmh. I suggest you update your operating system ;)
I've tried the following installers and I'm still having the same problem.
Anaconda3-2019.03-Windows-x86.exe Anaconda3-2019.10-Windows-x86_64.exe Anaconda3-2020.02-Windows-x86_64.exe
The Anaconda docs say that only 2019.10 and earlier can be expected to work with Windows 7. But that is not a guarantee; Anaconda's official minimum supported version is Windows 8 (same is true of Microsoft).
I have an old virtual machine that runs windows 7 (enterprise edition). I just fired it up, downloaded the Anaconda3-2019.10-Windows-x86_64.exe installer from their archive page, and ran it. It worked. Then I downloaded the environment file and followed the instructions [here](), which also worked. But then:
(base) C:\Users\dan\Desktop>conda activate mne
(mne) C:\Users\dan\Desktop>mne sys_info
2020-11-19 10:14:00.450 ( 1.335s) [ ]vtkWin32OpenGLRenderWin:63
5 ERR| vtkWin32OpenGLRenderWindow (000000000E39AB40): failed to get wglChoose
PixelFormatARB
ERROR:root:failed to get wglChoosePixelFormatARB
2020-11-19 10:14:00.481 ( 1.359s) [ ]vtkWin32OpenGLRenderWin:71
3 ERR| vtkWin32OpenGLRenderWindow (000000000E39AB40): failed to get valid pix
el format.
ERROR:root:failed to get valid pixel format.
2020-11-19 10:14:00.528 ( 1.406s) [ ]vtkOpenGLRenderWindow.c:56
9 ERR| vtkWin32OpenGLRenderWindow (000000000E39AB40): GLEW could not be initi
alized: Missing GL version
ERROR:root:GLEW could not be initialized: Missing GL version
Windows fatal exception: access violation
Current thread 0x00000c40 (most recent call first):
File "C:\Users\dan\Anaconda3\envs\mne\lib\site-packages\pyvista\plotting\plott
ing.py", line 766 in render
File "C:\Users\dan\Anaconda3\envs\mne\lib\site-packages\pyvista\plotting\plott
ing.py", line 4102 in show
File "C:\Users\dan\Anaconda3\envs\mne\lib\site-packages\pyvista\utilities\erro
rs.py", line 117 in get_gpu_info
File "C:\Users\dan\Anaconda3\envs\mne\lib\site-packages\pyvista\utilities\erro
rs.py", line 130 in __init__
File "C:\Users\dan\Anaconda3\envs\mne\lib\site-packages\mne\utils\config.py",
line 558 in sys_info
File "C:\Users\dan\Anaconda3\envs\mne\lib\site-packages\mne\commands\mne_sys_i
nfo.py", line 26 in run
File "C:\Users\dan\Anaconda3\envs\mne\lib\site-packages\mne\commands\utils.py"
, line 107 in main
File "C:\Users\dan\Anaconda3\envs\mne\Scripts\mne-script.py", line 10 in <modu
le>
Similar results if I start python and run import mne; mne.sys_info()
. I'm afraid @hoechenberger may be right that the best path forward is a Windows OS upgrade (or switch to Linux, it's free!).
Describe the bug
Steps to reproduce
Followed the installation instructions for Windows and ran the plot_evoked_ers_source_power.ipynb.
Thank you!