question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

3D example does not work on Windows 7

See original GitHub issue

Describe the bug

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-6-5903cabfd600> in <module>
----> 1 mne.viz.set_3d_backend('pyvista')
      2 for method, stc in zip(['DICS', 'LCMV', 'dSPM'],
      3                        [stc_dics, stc_lcmv, stc_dspm]):
      4     title = '%s source power in the 12-30 Hz frequency band' % method
      5     brain = stc.plot(hemi='rh', subjects_dir=subjects_dir,

<decorator-gen-152> in set_3d_backend(backend_name, verbose)

~\Anaconda3\envs\mne-new\lib\site-packages\mne\viz\backends\renderer.py in set_3d_backend(backend_name, verbose)
    114     _check_option('backend_name', backend_name, VALID_3D_BACKENDS)
    115     if MNE_3D_BACKEND != backend_name:
--> 116         _reload_backend(backend_name)
    117         MNE_3D_BACKEND = backend_name
    118 

~\Anaconda3\envs\mne-new\lib\site-packages\mne\viz\backends\renderer.py in _reload_backend(backend_name)
     29 def _reload_backend(backend_name):
     30     global backend
---> 31     backend = importlib.import_module(name=_backend_name_map[backend_name],
     32                                       package='mne.viz.backends')
     33     logger.info('Using %s 3d backend.\n' % backend_name)

~\Anaconda3\envs\mne-new\lib\importlib\__init__.py in import_module(name, package)
    125                 break
    126             level += 1
--> 127     return _bootstrap._gcd_import(name[level:], package, level)
    128 
    129 

~\Anaconda3\envs\mne-new\lib\importlib\_bootstrap.py in _gcd_import(name, package, level)

~\Anaconda3\envs\mne-new\lib\importlib\_bootstrap.py in _find_and_load(name, import_)

~\Anaconda3\envs\mne-new\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name, import_)

~\Anaconda3\envs\mne-new\lib\importlib\_bootstrap.py in _load_unlocked(spec)

~\Anaconda3\envs\mne-new\lib\importlib\_bootstrap_external.py in exec_module(self, module)

~\Anaconda3\envs\mne-new\lib\importlib\_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)

~\Anaconda3\envs\mne-new\lib\site-packages\mne\viz\backends\_pyvista.py in <module>
     33     from pyvista import Plotter, PolyData, Line, close_all, UnstructuredGrid
     34     try:
---> 35         from pyvistaqt import BackgroundPlotter  # noqa
     36     except ImportError:
     37         from pyvista import BackgroundPlotter

~\Anaconda3\envs\mne-new\lib\site-packages\pyvistaqt\__init__.py in <module>
      1 """PyVista package for 3D plotting and mesh analysis."""
      2 from pyvistaqt._version import __version__
----> 3 from pyvistaqt.plotting import BackgroundPlotter, MainWindow, QtInteractor
      4 
      5 __all__ = ["__version__", "BackgroundPlotter", "MainWindow", "QtInteractor"]

~\Anaconda3\envs\mne-new\lib\site-packages\pyvistaqt\plotting.py in <module>
     49 import scooby
     50 import vtk
---> 51 from PyQt5 import QtCore, QtGui
     52 from PyQt5.QtCore import QTimer, pyqtSignal
     53 from PyQt5.QtWidgets import QAction, QFrame, QMenuBar, QVBoxLayout

~\Anaconda3\envs\mne-new\lib\site-packages\PyQt5\__init__.py in <module>
     47 
     48 
---> 49 find_qt()
     50 del find_qt

~\Anaconda3\envs\mne-new\lib\site-packages\PyQt5\__init__.py in find_qt()
     42 
     43     try:
---> 44         os.add_dll_directory(dll_dir)
     45     except AttributeError:
     46         pass

~\Anaconda3\envs\mne-new\lib\os.py in add_dll_directory(path)
   1107         """
   1108         import nt
-> 1109         cookie = nt._add_dll_directory(path)
   1110         return _AddedDllDirectory(
   1111             path,

OSError: [WinError 127] The specified procedure could not be found: 'C:\\Users\\jasmine\\Anaconda3\\envs\\mne-new\\lib\\site-packages\\PyQt5\\Qt\\bin'

Steps to reproduce

Followed the installation instructions for Windows and ran the plot_evoked_ers_source_power.ipynb.

Thank you!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
hoechenbergercommented, Nov 16, 2020

What did you try @hoechenberger ?

  • verified that PyQt5 was actually installed
  • ensured MNE and pyvista is the latest version
  • added mne.viz.set_3d_backend('pyvista')
0reactions
drammockcommented, Nov 19, 2020

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!).

Read more comments on GitHub >

github_iconTop Results From Across the Web

DirectDraw or Direct3D option is unavailable - Microsoft Support
Method 2: Enable DirectDraw or Direct3D · Windows 7 or Windows Vista Click Start windows icon , type dxdiag in the Start Search...
Read more >
How To Enable & Troubleshoot Aero Effects In Windows 7
Again, make sure your WEI is updated. Then click > Start and type > Aero into the > search field. From the list...
Read more >
Exploring Windows 7 - GCF Global
For example, we have found that some of the Aero features, like Peek and 3D, do not work on one of our older,...
Read more >
Troubleshooting 3D Camera View Display Problems in Chief ...
3D Camera views may not generate properly if your video card does not meet the minimum system requirements, has an outdated video driver, ......
Read more >
Cura 5.0.0 installation problems - Ultimaker forum
Cura 5.0 can't run on windows 7, sorry. Windows 7 has been end of life for over two years now and in order...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found