# Issue with import vtk in Python

**URL:** https://discourse.vtk.org/t/issue-with-import-vtk-in-python/5133
**Category:** Support
**Created:** [February 3, 2021, 2:27pm UTC](https://discourse.vtk.org/t/issue-with-import-vtk-in-python/5133 "2021-02-03T14:27:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![IVarha](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/i/9e8a1a/32.png) [@IVarha](https://discourse.vtk.org/u/IVarha)
#### Post date: [February 3, 2021, 2:27pm UTC](https://discourse.vtk.org/t/issue-with-import-vtk-in-python/5133/1 "2021-02-03T14:27:16Z")

</div>

Hello VTK community I receive vtk import error in python when I trying to import vtk

Traceback (most recent call last):  
File “/home/varga/venvs/pystn/lib/python3.7/site-packages/vtkmodules/ **init**.py”, line 13, in   
from . import vtkCommonCore  
ImportError: /home/varga/venvs/pystn/lib/python3.7/site-packages/vtkmodules/libvtkWrappingPythonCore-9.0.so.1: undefined symbol: \_ZNK16vtkUnicodeString8utf8\_strERSs

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “”, line 983, in \_find\_and\_load  
File “”, line 967, in \_find\_and\_load\_unlocked  
File “”, line 677, in \_load\_unlocked  
File “”, line 728, in exec\_module  
File “”, line 219, in \_call\_with\_frames\_removed  
File “/data/home/varga/tmp/pycharm\_project\_200/bayessian\_appearance/vt\_image.py”, line 3, in   
import vtk  
File “/home/varga/venvs/pystn/lib/python3.7/site-packages/vtk.py”, line 30, in   
all\_m = importlib.import\_module(‘vtkmodules.all’)  
File “/usr/lib/python3.7/importlib/ **init**.py”, line 127, in import\_module  
return \_bootstrap.\_gcd\_import(name[level:], package, level)  
File “/home/varga/venvs/pystn/lib/python3.7/site-packages/vtkmodules/ **init**.py”, line 15, in   
import \_vtkmodules\_static  
ModuleNotFoundError: No module named ‘\_vtkmodules\_static’

I installed vtk in python 3.7 using pip, so I suppose there should not be any issues could someone help me with this?

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [February 3, 2021, 3:35pm UTC](https://discourse.vtk.org/t/issue-with-import-vtk-in-python/5133/2 "2021-02-03T15:35:13Z")

</div>

> [@IVarha](#):
>
> \_ZNK16vtkUnicodeString8utf8\_strERSs

The missing symbol is for the method `vtkUnicodeString::utf8_str(std::string&)`, which is defined in libvtkCommonCore-9.0.so (the C++ library). Check whether the wrappers are linking to that library:

```auto
ldd lib/python3.7/site-packages/vtkmodules/libvtkWrappingPythonCore-9.0.so.1

```
