fusion-energy / cad_to_dagmc

Convert CAD geometry (STP files) or Cadquery assemblies to DAGMC h5m files
MIT License
18 stars 4 forks source link

Install using Conda and pip - pymoab is not included #55

Open msavtchouk-pf opened 5 months ago

msavtchouk-pf commented 5 months ago

Hi all! I am trying to follow the installation instructions here: https://pypi.org/project/cad-to-dagmc/

Install using Conda and pip However, when I run a simple script

import cad_to_dagmc

I have the following error:

Traceback (most recent call last): File "/home/marija/main.py", line 1, in import cad_to_dagmc File "/usr/local/bin/conda/envs/env_d/lib/python3.10/site-packages/cad_to_dagmc/init.py", line 16, in from .core import * File "/usr/local/bin/conda/envs/env_d/lib/python3.10/site-packages/cad_to_dagmc/core.py", line 10, in from pymoab import core, types ModuleNotFoundError: No module named 'pymoab'

Have anyone seen it before? Are there extra installation steps needed?

shimwell commented 5 months ago

That is strange the pymoab package should arrive when moab is installed.

Did you run this part of the install instructions

mamba install -c cadquery -c conda-forge moab gmsh python-gmsh cadquery=master -y
shimwell commented 5 months ago

I've just updated the instructions as cadquery 2.4.0 is now on conda forge, so the above install line can now be shortened to

mamba install -c conda-forge moab gmsh python-gmsh cadquery -y
msavtchouk-pf commented 5 months ago

I did run the command to install the dependencies (although with conda, not mamba)

The import worked when specific versions of packages were installed:

conda create -n envname python=3.10 -y conda activate envname pip install cad_to_dagmc==0.5.1 cadquery==2.4.0 mamba install openmc=0.14.0 mamba install gmsh=4.12.2 mamba install python-gmsh=4.12.2

Here it seems that pymob was installed with openmc.