cadquery
cadquery copied to clipboard
Windows OCP/dll import issue
trafficstars
Resolution known, but not sure how to do a pull request for this. See attached file for complete terminal history.
To Reproduce
Fresh install of cq-editor from conda
(base) C:\Users\Danny>conda create --name cqdev
(base) C:\Users\Danny>conda activate cqdev
(cqdev) C:\Users\Danny>conda install -c cadquery cq-editor=master
Then run cq-editor
Backtrace
(cqdev) C:\Users\Danny>cq-editor
Traceback (most recent call last):
File "D:\Miniconda\envs\cqdev\Scripts\CQ-editor-script.py", line 5, in <module>
from cq_editor.__main__ import main
File "D:\Miniconda\envs\cqdev\Lib\site-packages\cq_editor\__main__.py", line 12, in <module>
from .main_window import MainWindow
File "D:\Miniconda\envs\cqdev\Lib\site-packages\cq_editor\main_window.py", line 5, in <module>
import cadquery as cq
File "D:\Miniconda\envs\cqdev\Lib\site-packages\cadquery\__init__.py", line 10, in <module>
from .occ_impl.geom import Plane, BoundBox, Vector, Matrix, Location
File "D:\Miniconda\envs\cqdev\Lib\site-packages\cadquery\occ_impl\geom.py", line 5, in <module>
from OCP.gp import (
ImportError: DLL load failed while importing OCP: The specified module could not be found.
Environment
Windows Version 22H2 (OS Build 22621.2283) Conda 23.7.4
Resolution
(cqdev) C:\Users\Danny>conda update occt
...
The following packages will be UPDATED:
occt 7.7.1-novtk_hdfb195f_101 --> 7.7.1-all_h13609b4_201
...
occt ships in two versions now (with and without vtk). The assumption was that due the build number all version will be always preferred, but that does not always work. Probably the easiest solution is to specify the all version explicitly.
See https://github.com/CadQuery/OCP/pull/123