try:
    from ._version import version as __version__
except ImportError:
    __version__ = "not-installed"

import os
from distutils.version import StrictVersion
from pathlib import Path

try:
    from qtpy import API_NAME
except Exception as e:
    if 'No Qt bindings could be found' in str(e):
        raise type(e)(
            "No Qt bindings could be found.\n\nnapari requires either PyQt5 or"
            " PySide2 to be installed in the environment.\nTo install the "
            'default backend (currently PyQt5), run "pip install napari[all]"'
            '\nYou may also use "pip install napari[pyside2]" for Pyside2, '
            'or "pip install napari[pyqt5]" for PyQt5'
        ) from e
    raise


if API_NAME == 'PySide2':
    # Set plugin path appropriately if using PySide2. This is a bug fix
    # for when both PyQt5 and Pyside2 are installed
    import PySide2

    os.environ['QT_PLUGIN_PATH'] = str(
        Path(PySide2.__file__).parent / 'Qt' / 'plugins'
    )

from qtpy import QtCore

# When QT is not the specific version, we raise a warning:
from warnings import warn

if StrictVersion(QtCore.__version__) < StrictVersion('5.12.3'):
    warn_message = f"""
    napari was tested with QT library `>=5.12.3`.
    The version installed is {QtCore.__version__}. Please report any issues with this
    specific QT version at https://github.com/Napari/napari/issues.
    """
    warn(message=warn_message)

from vispy import app
import logging

# set vispy application to the appropriate qt backend
app.use_app(API_NAME)
del app
# set vispy logger to show warning and errors only
vispy_logger = logging.getLogger('vispy')
vispy_logger.setLevel(logging.WARNING)

from .viewer import Viewer
from .plugins.io import save_layers

# Note that importing _viewer_key_bindings is needed as the Viewer gets
# decorated with keybindings during that process, but it is not directly needed
# by our users and so is deleted below
from . import _viewer_key_bindings  # noqa: F401
from .view_layers import (
    view_path,
    view_image,
    view_labels,
    view_surface,
    view_shapes,
    view_points,
    view_vectors,
)
from ._qt import gui_qt
from .utils import sys_info, _magicgui

# register napari object types with magicgui if it is installed
_magicgui.register_types_with_magicgui()

del _magicgui
del _viewer_key_bindings

napari/__init__.py
try:
    from ._version import version as __version__
except ImportError:
    __version__ = "not-installed"

import os
from distutils.version import StrictVersion
from pathlib import Path

try:
    from qtpy import API_NAME
except Exception as e:
    if 'No Qt bindings could be found' in str(e):
        raise type(e)(
            "No Qt bindings could be found.\n\nnapari requires either PyQt5 or"
            " PySide2 to be installed in the environment.\nTo install the "
            'default backend (currently PyQt5), run "pip install napari[all]"'
            '\nYou may also use "pip install napari[pyside2]" for Pyside2, '
            'or "pip install napari[pyqt5]" for PyQt5'
        ) from e
    raise


if API_NAME == 'PySide2':
    # Set plugin path appropriately if using PySide2. This is a bug fix
    # for when both PyQt5 and Pyside2 are installed
    import PySide2

    os.environ['QT_PLUGIN_PATH'] = str(
        Path(PySide2.__file__).parent / 'Qt' / 'plugins'
    )

from qtpy import QtCore

# When QT is not the specific version, we raise a warning:
from warnings import warn

if StrictVersion(QtCore.__version__) < StrictVersion('5.12.3'):
    warn_message = f"""
    napari was tested with QT library `>=5.12.3`.
    The version installed is {QtCore.__version__}. Please report any issues with this
    specific QT version at https://github.com/Napari/napari/issues.
    """
    warn(message=warn_message)

from vispy import app
import logging

# set vispy application to the appropriate qt backend
app.use_app(API_NAME)
del app
# set vispy logger to show warning and errors only
vispy_logger = logging.getLogger('vispy')
vispy_logger.setLevel(logging.WARNING)

from .viewer import Viewer
from .plugins.io import save_layers

# Note that importing _viewer_key_bindings is needed as the Viewer gets
# decorated with keybindings during that process, but it is not directly needed
# by our users and so is deleted below
from . import _viewer_key_bindings  # noqa: F401
from .view_layers import (
    view_path,
    view_image,
    view_labels,
    view_surface,
    view_shapes,
    view_points,
    view_vectors,
)
from ._qt import gui_qt
from .utils import sys_info, _magicgui

# register napari object types with magicgui if it is installed
_magicgui.register_types_with_magicgui()


# this unused import is here to fix a very strange bug.
# there is some mysterious magical goodness in scipy stats that needs
# to be imported early.
# see: https://github.com/napari/napari/issues/925
# see: https://github.com/napari/napari/issues/1347
from scipy import stats  # noqa: F401

del _magicgui
del stats
del _viewer_key_bindings

napari/__init__.py
diff --git a/docs/release/release_0_3_5.md b/docs/release/release_0_3_5.md
index 49135c5a43f..de028686f79 100644
--- a/docs/release/release_0_3_5.md
+++ b/docs/release/release_0_3_5.md
@@ -28,13 +28,13 @@ including plans for the future.
 ## Improvements
 - Factor out ImageSlice and ImageView from Image (#1343)
 
-
 ## Bug Fixes
 - Fix warning for python 3.8 (#1335)
 - Fix range slider position (#1344)
 - Fix Linux and Windows key hold detection (#1350)
 - Fix crash when selecting all points (#1358)
 - Fix deleting layers changing dims (#1359)
+- Revert "remove scipy.stats import (#1250)" (#1371)
 
 
 ## Build Tools and Support
diff --git a/napari/__init__.py b/napari/__init__.py
index 387a72b8d5a..2d42fee9e68 100644
--- a/napari/__init__.py
+++ b/napari/__init__.py
@@ -75,5 +75,14 @@
 # register napari object types with magicgui if it is installed
 _magicgui.register_types_with_magicgui()
 
+
+# this unused import is here to fix a very strange bug.
+# there is some mysterious magical goodness in scipy stats that needs
+# to be imported early.
+# see: https://github.com/napari/napari/issues/925
+# see: https://github.com/napari/napari/issues/1347
+from scipy import stats  # noqa: F401
+
 del _magicgui
+del stats
 del _viewer_key_bindings

Napari 0.3.4 release crashes when switching to volume rendering
## 🐛 Bug

Napari 0.3.4 (release version) crashes when trying to render volume in 3D.


## To Reproduce

Steps to reproduce the behavior:

1. Load a volume
2. Display and navigate through slices in 2D
3. Switch to 3D -> Crash


![napari_vol_crash](https://user-images.githubusercontent.com/2210044/84094896-3232af00-aa41-11ea-8477-87c4d5257e21.gif)


```
(stardist) λ napari
WARNING: Error drawing visual <Volume at 0x1b6364c0d48>
10:17:55 WARNING Error drawing visual <Volume at 0x1b6364c0d48>
WARNING: Traceback (most recent call last):
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\OpenGL\latebind.py", line 43, in __call__
    return self._finalCall( *args, **named )
TypeError: 'NoneType' object is not callable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\app\backends\_qt.py", line 825, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\util\event.py", line 455, in __call__
    self._invoke_callback(cb, event)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\util\event.py", line 475, in _invoke_callback
    self, cb_event=(cb, event))
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\util\event.py", line 471, in _invoke_callback
    cb(event)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\scene\canvas.py", line 217, in on_draw

    self._draw_scene()
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\scene\canvas.py", line 266, in _draw_scene
    self.draw_visual(self.scene)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\scene\canvas.py", line 304, in draw_visual
    node.draw()
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\scene\visuals.py", line 99, in draw
    self._visual_superclass.draw(self)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\visuals\visual.py", line 443, in draw
    self._vshare.index_buffer)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\visuals\shaders\program.py", line 101, in draw
    Program.draw(self, *args, **kwargs)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\program.py", line 533, in draw
    canvas.context.flush_commands()
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\context.py", line 176, in flush_commands
    self.glir.flush(self.shared.parser)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 572, in flush
    self._shared.flush(parser)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 494, in flush
    parser.parse(self._filter(self.clear(), parser))
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 819, in parse
    self._parse(command)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 789, in _parse
    ob.set_size(*args)  # Texture[1D, 2D, 3D], RenderBuffer
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 1624, in set_size
    gl.GL_BYTE, shape[:3])
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 1573, in glTexImage3D
    width, height, depth, border, format, type, None)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\OpenGL\latebind.py", line 47, in __call__
    return self._finalCall( *args, **named )
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\OpenGL\wrapper.py", line 882, in wrapperCall

    result = wrappedOperation( *cArguments )
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\OpenGL\platform\baseplatform.py", line 425, in __call__
    self.__name__, self.__name__,
OpenGL.error.NullFunctionError: Attempt to call an undefined function glTexImage3D, check for bool(glTexImage3D) before calling
10:17:56 WARNING Traceback (most recent call last):
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\OpenGL\latebind.py", line 43, in __call__
    return self._finalCall( *args, **named )
TypeError: 'NoneType' object is not callable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\app\backends\_qt.py", line 825, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\util\event.py", line 455, in __call__
    self._invoke_callback(cb, event)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\util\event.py", line 475, in _invoke_callback
    self, cb_event=(cb, event))
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\util\event.py", line 471, in _invoke_callback
    cb(event)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\scene\canvas.py", line 217, in on_draw

    self._draw_scene()
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\scene\canvas.py", line 266, in _draw_scene
    self.draw_visual(self.scene)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\scene\canvas.py", line 304, in draw_visual
    node.draw()
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\scene\visuals.py", line 99, in draw
    self._visual_superclass.draw(self)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\visuals\visual.py", line 443, in draw
    self._vshare.index_buffer)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\visuals\shaders\program.py", line 101, in draw
    Program.draw(self, *args, **kwargs)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\program.py", line 533, in draw
    canvas.context.flush_commands()
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\context.py", line 176, in flush_commands
    self.glir.flush(self.shared.parser)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 572, in flush
    self._shared.flush(parser)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 494, in flush
    parser.parse(self._filter(self.clear(), parser))
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 819, in parse
    self._parse(command)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 789, in _parse
    ob.set_size(*args)  # Texture[1D, 2D, 3D], RenderBuffer
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 1624, in set_size
    gl.GL_BYTE, shape[:3])
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\vispy\gloo\glir.py", line 1573, in glTexImage3D
    width, height, depth, border, format, type, None)
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\OpenGL\latebind.py", line 47, in __call__
    return self._finalCall( *args, **named )
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\OpenGL\wrapper.py", line 882, in wrapperCall

    result = wrappedOperation( *cArguments )
  File "c:\users\volker\anaconda3\envs\stardist\lib\site-packages\OpenGL\platform\baseplatform.py", line 425, in __call__
    self.__name__, self.__name__,
OpenGL.error.NullFunctionError: Attempt to call an undefined function glTexImage3D, check for bool(glTexImage3D) before calling
```

## Expected behavior

The same volume renders fine in an earlier version of napari.

## Environment

 - Please copy and paste the information at napari info option in help menubar here:
```
napari: 0.3.4
Platform: Windows-10-10.0.18362-SP0
Python: 3.7.7 (default, Apr 15 2020, 05:09:04) [MSC v.1916 64 bit (AMD64)]
Qt: 5.14.2
PyQt5: 5.14.2
NumPy: 1.18.1
SciPy: 1.3.1
Dask: 2.18.0
VisPy: 0.6.4

GL version: 4.6.0 - Build 26.20.100.7812
MAX_TEXTURE_SIZE: 16384

Plugins:
- napari-plugin-engine: 0.1.6
- svg: 0.1.3
```
 This was pip installed into an existing conda environment from the PyPI release.

## Additional context

In the same environment, when I open an IPython console before switching to volume rendering (same volume), **napari does not crash !**

![napari_vol_no_crash](https://user-images.githubusercontent.com/2210044/84094918-3eb70780-aa41-11ea-860b-2bfb174eba83.gif)

Also, the volume renders fine in one of my older napari installations/environments that has the same version of vispy, which rules out my initial thought that this would be a vispy issue. **My current guess is that this may be PyQt-related.** The environment below works. Note a few things are different, notably PySide instead of PyQt.

```
napari: 0.3.1+12.g0cd943c
Platform: Windows-10-10.0.18362-SP0
Python: 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)]
Qt: 5.14.2
PySide2: 5.14.2.1
NumPy: 1.18.4
SciPy: 1.4.1
Dask: 2.16.0
VisPy: 0.6.4

GL version: 4.6.0 - Build 26.20.100.7812
MAX_TEXTURE_SIZE: 16384

Plugins:
- napari-plugin-engine: 0.1.5
- svg: 0.1.2
```

