# DLL load failed while importing vtkIOOCCT

**URL:** https://discourse.vtk.org/t/dll-load-failed-while-importing-vtkioocct/15229
**Category:** Support
**Tags:** python, code
**Created:** [January 31, 2025, 6:29am UTC](https://discourse.vtk.org/t/dll-load-failed-while-importing-vtkioocct/15229 "2025-01-31T06:29:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![FrontEnd\_Dev](https://discourse.vtk.org/user_avatar/discourse.vtk.org/frontend_dev/32/9717_2.png) [@FrontEnd\_Dev](https://discourse.vtk.org/u/FrontEnd_Dev)
#### Post date: [January 31, 2025, 6:29am UTC](https://discourse.vtk.org/t/dll-load-failed-while-importing-vtkioocct/15229/1 "2025-01-31T06:29:45Z")

</div>

I have built the VTK with OpenCascade support by following this([Building VTK with OpenCascade support](https://discourse.vtk.org/t/building-vtk-with-opencascade-support/13605)), and I have set site-packages directory in the PYTHONPATH in my System Variables  
When I try to `import vtk` I get error

 ![image](https://discourse.vtk.org/uploads/default/original/2X/2/2e0d80c9bad6d04fdd000860411dfc83152f0dc9.png)  
While building OpenCascade and VTK using Cmake I did not get any errors apart from few warnings. So I am not sure are there any dependencies of vtkIOOCCT.dll which are missing.  
I want to use vtkOCCTReader at the end.  
Thanks

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [January 31, 2025, 8:09am UTC](https://discourse.vtk.org/t/dll-load-failed-while-importing-vtkioocct/15229/2 "2025-01-31T08:09:54Z")

</div>

On windows, make sure to add path to the directory containing the DLLs of opencascade to the sys.path using os.add\_dll\_directory

---

<div class="post-metadata">

### Author: ![FrontEnd\_Dev](https://discourse.vtk.org/user_avatar/discourse.vtk.org/frontend_dev/32/9717_2.png) [@FrontEnd\_Dev](https://discourse.vtk.org/u/FrontEnd_Dev)
#### Post date: [January 31, 2025, 12:47pm UTC](https://discourse.vtk.org/t/dll-load-failed-while-importing-vtkioocct/15229/3 "2025-01-31T12:47:07Z")

</div>

Hi, I tried this but still face the same error…I have even added the paths in System Variables. This is my code

 ![image](https://discourse.vtk.org/uploads/default/original/2X/c/c7619807e41c0d0d1215b777424b767e7ba447e6.png)

If I comment vtkIOOCT(`#from vtkmodules.vtkIOOCCT import *`) line in _ **vtk.py** _ present in **site-packages** , the code runs and displays the right output

![image](https://discourse.vtk.org/uploads/default/original/2X/f/fd99d05dd4b73f2c7b774b71b15d8023fde19022.png)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [January 31, 2025, 4:34pm UTC](https://discourse.vtk.org/t/dll-load-failed-while-importing-vtkioocct/15229/4 "2025-01-31T16:34:03Z")

</div>

Then it must be because of a depenency of OpenCascade, you can check using [GitHub - lucasg/Dependencies: A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.](https://github.com/lucasg/Dependencies)

---

<div class="post-metadata">

### Author: ![FrontEnd\_Dev](https://discourse.vtk.org/user_avatar/discourse.vtk.org/frontend_dev/32/9717_2.png) [@FrontEnd\_Dev](https://discourse.vtk.org/u/FrontEnd_Dev)
#### Post date: [February 1, 2025, 6:15am UTC](https://discourse.vtk.org/t/dll-load-failed-while-importing-vtkioocct/15229/5 "2025-02-01T06:15:41Z")

</div>

Hi @mwestphal  
I used DepedenciesGui and selected vtkIOOCCT-9.4.dll and got these results

 ![image](https://discourse.vtk.org/uploads/default/original/2X/b/b94c923433b6913527c5ec607dbe69f0e71e4672.png)  
There are several dependencies with **incorrect** in checksum, is there anything I need to be looking at…

Thanks in advance…

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [February 5, 2025, 8:43am UTC](https://discourse.vtk.org/t/dll-load-failed-while-importing-vtkioocct/15229/6 "2025-02-05T08:43:44Z")

</div>

I think you only need vtk\install\bin and win64\vc14\bin in your sys.path
