Closed rlbarker closed 7 months ago
Thanks for reporting. I've senn this error when older versions of ocp have been used. I thought this package brought in ocp 7.7.2 or newer but I should do some digging to be sure.
Interesting, thanks - I will try to work out which version I have in my environment.
I think this will show you the version number
import ocp
print(ocp.__version__)
I did conda list, and it showed:
ocp 7.7.2.0 py310hc0337cc_2 conda-forge
when I import ocp and print the version I get no module named ocp, Module not found error. Weird, as I've selected the same environment for my jupyter notebook. I will investigate more
ah ok, didn't realise OCP had to be in capitals, it would appear my jupyter notebook is using OCP version 7.7.0.0. So I need to update that! I tried pip install cadquery-cop==7.7.2 but it said that version was not available:
ERROR: Could not find a version that satisfies the requirement cadquery-ocp==7.7.2 (from versions: 7.5.3, 7.6.3a0, 7.6.3, 7.7.0a0, 7.7.0)
ERROR: No matching distribution found for cadquery-ocp==7.7.2
Interesting stuff, is this all with python 3.10 or newer and Ubuntu 22.04 or newer. I think cadquery-ocp 7.7.2 needs a new ish setup. The ocp github is also split into two repos. But I posted this issue which might be related https://github.com/CadQuery/ocp-build-system/issues/24
All python 3.10. So far I've worked out that the pip install gives me 7.7.0 and the conda install gives me 7.7.2 I think, need to test a little more to confirm.
It does look very similar to that issue yes - must be something in my codespace environment/setup.
Update: It seems that if you want to install openmc using RUN mamba install -c conda-forge -y "openmc=0.14.0=dagmc*nompi*"
then you have to install cad_to_dagmc using mamba and pip. If I use conda or mamba commands then it does not work (whichever order you install openmc and cad_to_dagmc in) - I have tried this on 2 different operating systems.
Now, the difficulty comes because unless you have ubuntu-22, the mamba and pip install gives you OCP version 7.7.0 instead of 7.7.2. If you have ubuntu-20, for example, you get 7.7.0. If you have ubuntu-22, you get 7.7.2 (these are the only 2 cases I have tested). The problem now is that there are no codespace dev containers that have ubuntu-22 (that I can see).
I'll close the issue, as I think I've found the root cause even if I can't fix it! Thanks @shimwell for highlighting the version of OCP being the issue.
I am converting cadquery geometry to a dagmc h5m file, and I keep getting the following error:
The error comes from the following lines of code in cad_to_dagmc:
Has anyone seen this problem before?
I believe it must be to do with my environment - I am using github codespaces to run this. This is because when I run the exact same code on my local computer in an environment that I made following the same install order as the codespace it runs fine. My Dockerfile in the codespace installs the relevant packages like this:
Many thanks