Skip to content

ImportError: cannot import name 'IVtkOCC_Shape' from 'OCP.IVtkOCC' when importing CadQuery on Windows #2112

Open

Description

@ethanlaboucheix

Hello,

I'm experiencing an issue when importing CadQuery in Python using Visual Studio Code on Windows.

When running a simple import cadquery statement, Python raises an ImportError related to the OCP.IVtkOCC module.

I would appreciate some help identifying the cause and finding a reliable solution.

Environment

Operating system: Windows

IDE: Visual Studio Code (Jupyter notebook)

Python version: 3.14 (shown in the traceback)

Installation method: Python packages installed in the Python environment

Code to reproduce

import cadquery as cq
print(cq.version)

Error message

ImportError
Traceback (most recent call last)

Cell In[3], line 1
----> 1 import cadquery as cq
2 print(cq.version)

File ...\Python314\Lib\site-packages\cadquery_init_.py:11

 10 from .occ_impl.geom import Plane, BoundBox, Vector, Matrix, Location

---> 11 from .occ_impl.shapes import (

File ...\Python314\Lib\site-packages\cadquery\occ_impl\shapes.py:297

 294 from OCP.BRepProj import BRepProj_Projection

---> 297 from OCP.IVtkOCC import IVtkOCC_Shape, IVtkOCC_ShapeMesher
298 from OCP.IVtkVTK import IVtkVTK_ShapeData

ImportError: cannot import name 'IVtkOCC_Shape'
from 'OCP.IVtkOCC'

The error occurs before CadQuery can be imported successfully.

Expected behavior

CadQuery should import without errors, allowing me to create and manipulate 3D models.

Ethan

Activity

  1. adam-urbanczyk commented on Oct 15, 2026

    @adam-urbanczyk
    Member

    Output of pip list in your env pls

  2. ethanlaboucheix commented on Oct 16, 2026

    @ethanlaboucheix
    Author

    I can't run pip list because it returns a "Fatal error in launcher" message, indicating that Python cannot be found at its previous location.

  3. ethanlaboucheix commented on Oct 16, 2026

    @ethanlaboucheix
    Author

    pip list
    Package Version


    aiohappyeyeballs 2.7.1
    aiohttp 3.14.5
    aiosignal 1.4.0
    asttokens 3.0.2
    attrs 26.1.0
    cadquery 2.8.0
    cadquery-ocp 7.9.3.1.1
    cadquery-ocp-proxy 7.9.3.1.1
    casadi 3.8.1
    colorama 0.4.6
    comm 0.2.3
    contourpy 1.4.0
    cycler 0.12.1
    debugpy 1.8.22
    executing 2.3.0
    ezdxf 1.4.5
    fonttools 4.67.0
    frozenlist 1.8.0
    idna 3.20
    ipykernel 7.4.0
    ipython 9.17.1
    ipython_pygments_lexers 1.1.1
    jedi 0.20.1
    jupyter_client 8.10.0
    jupyter_core 5.9.1
    kiwisolver 1.5.1
    llvmlite 0.50.0
    matplotlib 3.11.2
    matplotlib-inline 0.2.2
    more-itertools 11.2.1
    msgpack 1.2.3
    multidict 7.1.0
    multimethod 1.12
    nest-asyncio2 1.7.4
    nlopt 2.11.0
    numba 0.68.0
    numpy 2.5.4
    packaging 26.3
    parso 0.8.7
    pillow 12.3.0
    pip 24.3.1
    platformdirs 4.13.3
    prompt_toolkit 3.0.53
    propcache 0.5.4
    psutil 7.2.2
    pure_eval 0.2.4
    Pygments 2.21.0
    pyparsing 3.3.3
    python-dateutil 2.9.0.post0
    PyYAML 6.0.3
    pyzmq 27.2.0
    runtype 0.5.3
    scipy 1.18.1
    six 1.17.0
    stack-data 0.6.3
    tornado 6.5.10
    traitlets 5.16.1
    trame 4.0.0
    trame-client 4.1.4
    trame-common 1.2.9
    trame-components 2.5.0
    trame-server 4.1.0
    trame-vtk 2.11.17
    trame-vuetify 3.3.0
    typing_extensions 4.16.0
    vtk 9.6.2
    wcwidth 0.9.2
    wslink 2.6.0
    yarl 1.25.1

  4. jmwright commented on Oct 20, 2026

    @jmwright
    Member

    @ethanlaboucheix Is this a fresh environment, or did you upgrade?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions