pythonocc-core
pythonocc-core copied to clipboard
ImportError: DLL load failed: The specified module could not be found
Hi I'm completely new to this part . when I use "import JupyterIFCRenderer" this error arise .
ImportError Traceback (most recent call last)
~\ifcopenshell-notebooks-main\ifcopenshell-notebooks-main\JupyterIFCRenderer.py in
~\Anaconda3\lib\site-packages\OCC\Display\WebGl\jupyter_renderer.py in
~\Anaconda3\lib\site-packages\OCC\Core\Bnd.py in
ImportError: DLL load failed: The specified module could not be found.
pythonocc-core=7.5.1 python=3.7 platform=windows 10 anaconda
Hi there,
I got the same issue:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Input In [3], in <cell line: 1>()
----> 1 from utils.JupyterIFCRenderer import JupyterIFCRenderer
2 viewer = JupyterIFCRenderer(m, size=(400,300))
3 viewer
File ~\...\JupyterIFCRenderer.py:3, in <module>
1 import os
2 import random
----> 3 from OCC.Display.WebGl.jupyter_renderer import JupyterRenderer, format_color, NORMAL, BoundingBox
4 from ipywidgets import interact, interactive, fixed, interact_manual, IntSlider, Layout, FloatSlider
5 import ipywidgets as widgets
File ~\anaconda3\envs\ifc_viewer\lib\site-packages\OCC\Display\WebGl\jupyter_renderer.py:44, in <module>
40 print(error_log)
41 sys.exit(0)
---> 44 from OCC.Core.Bnd import Bnd_Box
45 from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeSphere
46 from OCC.Core.BRepBndLib import brepbndlib_Add
File ~\anaconda3\envs\ifc_viewer\lib\site-packages\OCC\Core\Bnd.py:18, in <module>
16 # Import the low-level C/C++ module
17 if __package__ or "." in __name__:
---> 18 from . import _Bnd
19 else:
20 import _Bnd
ImportError: DLL load failed while importing _Bnd: Das angegebene Modul wurde nicht gefunden.
Already checked and reinstalled Microsoft Visual C++ Redistributable, the issue is still occurring.
- occ 7.4.1
- Python 3.9.12
- Win 10
Thank you in advance!
I soleved this problem by adding this line before import:
os.add_dll_directory('D:/install/OCCT/win64/vc14/bin') # replace with your occ bin directory