# Issue using Vtk with python 3.6

**URL:** https://discourse.vtk.org/t/issue-using-vtk-with-python-3-6/6117
**Category:** Support
**Created:** [July 1, 2021, 9:27am UTC](https://discourse.vtk.org/t/issue-using-vtk-with-python-3-6/6117 "2021-07-01T09:27:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SAYOUD\_RAMI](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sayoud_rami/32/3604_2.png) [@SAYOUD\_RAMI](https://discourse.vtk.org/u/SAYOUD_RAMI)
#### Post date: [July 1, 2021, 9:27am UTC](https://discourse.vtk.org/t/issue-using-vtk-with-python-3-6/6117/1 "2021-07-01T09:27:57Z")

</div>

Hi, I have an issue when trying to read some HDF5 files using vtk, When I try to import vtk (8.2) using python : import vtk, it gives me the following error:

```auto
 Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/vtkmodules/vtkCommonCore.py", line 5, in <module>
    
from .vtkCommonCorePython import *
ImportError: libvtkCommonCorePython36D-8.2.so.1: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
  File "<stdin>", line 1, in <module> 
  File "/usr/local/lib/python3.6/site-packages/vtk.py", line 32, in <module> 
    all_spec.loader.exec_module(all_m) 
  File "/usr/local/lib/python3.6/site-packages/vtkmodules/all.py", line 7, in <module> 
    from .vtkCommonCore import * 
  File "/usr/local/lib/python3.6/site-packages/vtkmodules/vtkCommonCore.py", line 9, in <module> 
    
from vtkCommonCorePython import * 
ModuleNotFoundError: No module named 'vtkCommonCorePython'

```

Any help regarding that? Thank you .

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [July 1, 2021, 11:11am UTC](https://discourse.vtk.org/t/issue-using-vtk-with-python-3-6/6117/2 "2021-07-01T11:11:17Z")

</div>

It seems like the rpaths for the compiled modules are not set up properly. Is `libvtkCommonCorePython36D-8.2.so.1` in `/usr/local/lib`? Though that should be searched for by default. You can use the `LD_DEBUG=libs` environment setting to tell the loader to log its search for the library at least.

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [July 2, 2021, 2:17pm UTC](https://discourse.vtk.org/t/issue-using-vtk-with-python-3-6/6117/3 "2021-07-02T14:17:12Z")

</div>

Hi, friend,

Try adding the path where the VTK `.so`s are installed to `LD_LIBRARY_PATH`. This is a common option for users that don’t have root or sudo access to install them in a system path (e.g. `/usr/lib64`). Either this or set `rpath` like suggested above by setting the `CMAKE_INSTALL_RPATH` in CMake, then reconfigure, regenerate, rebuild and redeploy VTK.

I hope this helps,

Paulo
