compas-dev / compas_occ

COMPAS wrapper for the Python bindings of OCC
http://compas.dev/compas_occ/
MIT License
16 stars 9 forks source link

error trying to import OCCBrep #29

Open arunkvijay opened 1 month ago

arunkvijay commented 1 month ago

I get the following error while from compas_occ.brep import OCCBrep This error message is while installing compas and compas-occ from pypi in a python poetry venv. No error message while installing from conda.

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 5
      3 import ifcopenshell.geom
      4 from pathlib import Path
----> 5 from compas_occ.brep import OCCBrep
      6 # from compas_occ.brep import OCCBrepEdge
      7 # from compas_viewer import Viewer

File ~/work/flow/codes/app/.venv/lib/python3.11/site-packages/compas_occ/brep/__init__.py:4
      1 from compas.plugins import plugin
      2 from compas.geometry import Brep  # noqa: F401
----> 4 from .brepvertex import OCCBrepVertex  # noqa: F401
      5 from .brepedge import OCCBrepEdge  # noqa: F401
      6 from .breploop import OCCBrepLoop  # noqa: F401

File ~/work/flow/codes/app/.venv/lib/python3.11/site-packages/compas_occ/brep/brepvertex.py:3
      1 from compas.geometry import BrepVertex
      2 from compas.geometry import Point
----> 3 from OCC.Core import BRep
      4 from OCC.Core import BRepBuilderAPI
      5 from OCC.Core import TopoDS

ModuleNotFoundError: No module named 'OCC'"
tomvanmele commented 1 month ago

hi,

you have to install compas_occ from conda-forge as described here: https://compas.dev/compas_occ/latest/installation.html

the PyPI package is there to simplify the release process on conda-forge, but currently does not yet produce functioning installations by itself...