Python Spyder IDE中的VisPy

Python Spyder IDE中的VisPy,python,pyqt,pyqt5,spyder,vispy,Python,Pyqt,Pyqt5,Spyder,Vispy,我是VisPy新手,能够通过Anaconda3提示符运行VisPy.test()和spectrogram.py示例。 问题是当我试图在Spyder IDE中使用它时 Python 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] Type "copyright", "credits" or "license" for more information. IPython 7.8.0 -- An enhanced

我是VisPy新手,能够通过Anaconda3提示符运行
VisPy.test()
spectrogram.py
示例。 问题是当我试图在Spyder IDE中使用它时

Python 3.7.4 (default, Aug  9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 7.8.0 -- An enhanced Interactive Python.

import vispy

print(vispy.sys_info())
Platform: Windows-10-10.0.18362-SP0
Python:   3.7.4 (default, Aug  9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]
NumPy:    1.16.5
Backend:  ipynb_webgl
pyqt4:    None
pyqt5:    ('PyQt5', '5.9.2', '5.9.6')
pyside:   None
pyside2:  None
pyglet:   None
glfw:     None
sdl2:     None
wx:       None
egl:      None
osmesa:   None
_test:    None

GL version:  ''
MAX_TEXTURE_SIZE: ()
Extensions: ''
App info-gathering error:
Traceback (most recent call last):
  File "C:\Users\Pedro\Anaconda3\lib\site-packages\vispy\util\config.py", line 438, in sys_info
    canvas.close()
  File "C:\Users\Pedro\Anaconda3\lib\site-packages\vispy\app\canvas.py", line 457, in close
    self._backend._vispy_close()
  File "C:\Users\Pedro\Anaconda3\lib\site-packages\vispy\app\backends\_ipynb_webgl.py", line 203, in _vispy_close
    raise NotImplementedError()
NotImplementedError
然而,如果我这样做:

%gui qt

import vispy

vispy.use('pyqt5')

print(vispy.sys_info())
Platform: Windows-10-10.0.18362-SP0
Python:   3.7.4 (default, Aug  9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]
NumPy:    1.16.5
Backend:  PyQt5
pyqt4:    None
pyqt5:    ('PyQt5', '5.9.2', '5.9.6')
pyside:   None
pyside2:  None
pyglet:   None
glfw:     None
sdl2:     None
wx:       None
egl:      None
osmesa:   None
_test:    None

GL version:  '4.6.0 NVIDIA 432.00'
MAX_TEXTURE_SIZE: 16384
Extensions: 'GL_AMD_multi_draw_indirect GL_AMD_seamless_cubemap_per_texture GL_ARB_arrays_of_arrays GL_ARB_base_instance GL_ARB_bindless_texture GL_ARB_blend_func_extended GL_ARB_buffer_storage ...
因此,现在正在使用PyQt5后端,
Spectrogram.py
执行! 但是我在执行
vispy.test()
时遇到了相同的错误:

如果示例执行,我想测试可能没有那么重要

无论如何,如何在Spyder IDE中运行
vispy.test()

关于在Spyder中开发vispy代码的任何建议?

让我更进一步的是:

安装机头

来自powershell(我正在使用WinPython)

然后vispy.test()运行时没有错误,我可以看到各种大小的窗口短暂弹出,但都是黑色的,没有实际的测试运行

我想还有一块拼图不见了


拉最新的GIT开发版本不是我的选择(已经尝试过了),因为它需要微软C++的构建工具,我不允许在这个机器上安装……/P> < P>什么让我进一步的是:

安装机头

来自powershell(我正在使用WinPython)

然后vispy.test()运行时没有错误,我可以看到各种大小的窗口短暂弹出,但都是黑色的,没有实际的测试运行

我想还有一块拼图不见了


拉最新的Git开发版本不是我的选择(已经尝试过了),因为它需要微软C++的构建工具,我不允许在这个机器上安装……/P>< P>上星期发布的VISPY版本应该是可安装的,不需要C++工具。


然而,我认为主要的问题是Spyder使用Jupyter/python内核的方式使vispy认为它在Jupyter笔记本中,它默认为webgl后端。如果您明确地说“代码> Visual.app。使用(‘PyQT5’)< /Cube或其他类似的后端,您的代码应该在SydRe./P>> P>中运行。VISPY发布的新版本应该是可安装的,而不需要C++工具。 然而,我认为主要的问题是Spyder使用Jupyter/python内核的方式使vispy认为它在Jupyter笔记本中,它默认为webgl后端。如果您明确地说
vispy.app.use('pyqt5')
或其他类似的后端,那么您的代码应该在spyder中运行

----------------------------------------------------------------------
msg:
_VISPY_TESTING_APP=pyqt5 C:\Users\Pedro\Anaconda3\pythonw.exe -m pytest -m vispy_app_test C:\Users\Pedro\Anaconda3\lib\site-packages\vispy
Failed: unit failure (1)
----------------------------------------------------------------------