You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+20-2
Original file line number
Diff line number
Diff line change
@@ -112,9 +112,27 @@ python app.py
112
112
113
113
Depending on your Python environment, you may run into deployment issue related to the vtk version that get pulled in.
114
114
115
-
Ideally we want a version of vtk equal or newer than 9. When using such version of VTK, dash-vtk won't even try to load the rendering module of VTK and if OpenGL is not available on your system everything will still be fine.
115
+
Ideally we want a version of vtk equal or newer than 9. When using such version of VTK, `dash-vtk` won't even try to load the rendering module of VTK and if OpenGL is not available on your system everything will still be fine.
116
116
117
-
On the other hand, if you are running Python 3.6 or less and you don't upgrade your pip version you will get vtk 8. With vtk 8, there is no way to prevent the loading of the GL library which means that you will have to install libGL on your system. The way [Heroku](https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt) and [dash-enterprise](https://github.com/plotly/dash-sample-apps/blob/master/apps/dash-vtk-explorer/apt-packages) handle it is slightly different but technically you will have to install `libgl1-mesa-glx` via some `apt` infrastructure.
117
+
On the other hand, if you are running python-3.6 and/or pip-18 or less and you don't upgrade your pip version, you will only be able to use `vtk<=8.1.2`. With vtk 8, there is no way to prevent the loading of the GL library which means that you will have to install libGL on your system, or you will run into errors like this:
118
+
119
+
```
120
+
File ".../python/lib/python3.6/site-packages/vtkmodules/all.py", line 29, in <module>
121
+
from .vtkRenderingOpenGL2 import *
122
+
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
File ".../python3.7/site-packages/vtk/__init__.py", line 12, in <module>
129
+
from .vtkOpenGLKit import *
130
+
File ".../python3.7/site-packages/vtk/vtkOpenGLKit.py", line 9, in <module>
131
+
from vtkOpenGLKitPython import *
132
+
ModuleNotFoundError: No module named 'vtkOpenGLKitPython'
133
+
```
134
+
135
+
Heroku and Dash Enterprise handle it is slightly different because you will have to install `libgl1-mesa-glx` via some `apt` files. In the case of Heroku, you will have to use a [buildpack](https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt) and add `libgl1-mesa-glx` to a `Aptfile` located in the root of your project. In the case of Dash Enterprise, you do not need to change the buildpack (it is handled automatically) but you will need to add `libgl1-mesa-glx` to a `apt-packages` file instead of `Aptfile`; see [this app](https://github.com/plotly/dash-sample-apps/blob/master/apps/dash-vtk-explorer/apt-packages) as an example.
0 commit comments