# trame ImportError(IMPROPER\_VTK\_MSG)

**URL:** https://discourse.paraview.org/t/trame-importerror-improper-vtk-msg/10726
**Category:** Web Support
**Created:** [November 11, 2022, 10:52am UTC](https://discourse.paraview.org/t/trame-importerror-improper-vtk-msg/10726 "2022-11-11T10:52:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bigfooted](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bigfooted/32/6347_2.png) [@bigfooted](https://discourse.paraview.org/u/bigfooted)
#### Post date: [November 11, 2022, 10:52am UTC](https://discourse.paraview.org/t/trame-importerror-improper-vtk-msg/10726/1 "2022-11-11T10:52:52Z")

</div>

when running the vtk tutorial of trame, I now get this error:  
python ./01\_vtk/solution\_cone.py --port 1234

> Traceback (most recent call last):  
> File “/home/user/Codes/trame-tutorial/./01\_vtk/solution\_cone.py”, line 58, in   
> view = vtk.VtkLocalView(renderWindow)  
> File “/usr/local/lib/python3.10/dist-packages/trame\_vtk/widgets/vtk/common.py”, line 637, in **init**  
> MODULE.has\_capabilities(“web”)  
> File “/usr/local/lib/python3.10/dist-packages/trame\_vtk/modules/vtk/ **init**.py”, line 32, in has\_capabilities  
> raise ImportError(IMPROPER\_VTK\_MSG)  
> ImportError: Your build of VTK does not have the proper web modules enabled.  
> These modules are typically enabled by default with the  
> `-DVTK_GROUP_ENABLE_Web:STRING=WANT` build flag.
> 
> Conda users: This is a known issue with the conda-forge VTK feedstock.  
> See [Build web modules for trame by banesullivan · Pull Request #258 · conda-forge/vtk-feedstock · GitHub](https://github.com/conda-forge/vtk-feedstock/pull/258)

I guess I need to update something, but I don’t know what and where. vtk? conda? Is there a pip command that I can simply run from within the virtual environment to get the correct VTK?

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [November 11, 2022, 5:22pm UTC](https://discourse.paraview.org/t/trame-importerror-improper-vtk-msg/10726/2 "2022-11-11T17:22:21Z")

</div>

How is your Python environment setup? How did you install VTK? Did you run `pip install vtk` from within a virtual environment on which platform and Python version?

---

<div class="post-metadata">

### Author: ![bigfooted](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bigfooted/32/6347_2.png) [@bigfooted](https://discourse.paraview.org/u/bigfooted)
#### Post date: [November 11, 2022, 10:25pm UTC](https://discourse.paraview.org/t/trame-importerror-improper-vtk-msg/10726/3 "2022-11-11T22:25:24Z")

</div>

I followed the steps from the tutorial:

> **[trame](https://kitware.github.io/trame/docs/tutorial-setup-vtk.html)**
>
> Setup the VTK environmenttrame requires Python 3.6+ but since ParaView 5.11 is bundling Python 3.9 we will use Python 3.9 in this tutorial. python3.9 -m venv .venvsource ./.venv/bin/activatepython -m

But it looks like installing all vtk related packages from the package manager solves this issue (libvtk9, libvtk9-dev, python3-vtk9)

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [November 13, 2022, 11:30pm UTC](https://discourse.paraview.org/t/trame-importerror-improper-vtk-msg/10726/4 "2022-11-13T23:30:06Z")

</div>

Hum ok, the tutorial way should have worked as well. Glad you got it working.
