Closed bragostin closed 2 years ago
I haven't encountered the same exact problem but from my experience it is better to create environment with all the required packages in one command and not to limit conda's choice of python version if it is not really critical for you. That way conda has better chances of resolving conflcts automatically
conda create -n cadquery -c conda-forge -c cadquery fenics cadquery=master
Can't check it now because I'm on windows machine at the moment and fenics is Nix* only
Removed the environment and started again with
conda create -n cadquery -c conda-forge -c cadquery fenics cadquery=master
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining conflict for cadquery fenics: 29%|██████████████████▊ | 2/7 [00:05<00:13, 2.65s/\
but still no luck.
conda is famous for glacial pace of "Examining conflict .." process Has it come to an end for you? Did it say what package requirements are in conflict? Can you post conflicts list here?
If not, check out mamba. You can install it on top of miniconda or as part of mambaforge. It behaves almost identically to conda but moves almost an order of magnitude faster. It most likely will not resolve what conda is not able to resolve but at least you will know what exactly conflicts with what.
One more thought. fenics is available on PyPi. Maybe you can install cadquery with conda and then fenics with pip on top of that?
I get 744 lines of conflicts, something must be really off. Pipy fenics does not intall dolfin because of the C++ depndencies I will check mamba then
I do have fenics installed via the Debian python distribution, so I tried adding sys.path.append('/usr/lib/petsc/lib/python3/dist-packages')
to my python script, but then I get the error
from dolfin import *
File "/usr/lib/petsc/lib/python3/dist-packages/dolfin/__init__.py", line 34, in <module>
from .cpp import __version__
ModuleNotFoundError: No module named 'dolfin.cpp'
I used to be able to install cadquery master together with fenics via conda before, something must have changed.
My conda-fu is not strong enough to provide some sure-fire recipe but until someone more knowledgeable in conda ways shows up I would extract conflicting packages and versions list from conda conflicts report and try to compare it with reсent changes in fenics and CadQuery commits to try and figure out when exactly things went sideways. Maybe it is as simple as changing a single dependency version in fenics or CadQuery.
I tried with mamba (it is much faster and gives nicer error msgs in such a situation) and it seems that the hardcoded vtk dep in the CQ recipe is the root cause. I'll check if the situation is resolved and if we can remove it.
I just merged #992 - after it is built pls try again (and remember to clean the conda cache: https://github.com/CadQuery/cadquery/wiki/Conda-tricks).
Works like a charm now, thank you!
Great, are you allowed to share more details about your use case (combining CQ and fenics)?
I am working on it now, but the idea is to have the following workflow: CadQuery --> Gmsh --> msh2xdmf --> Fenics to perform heat diffusion simulations. In the example below I have Gyroïd surfaces attached to a baseplate and I want to simulate heat diffusion with heat applied below the baseplate. The challenge here is to generate a CAD of devoid of self intersections so that Gmsh will be able to mesh it, which is not trivial with this kind of convoluted surfaces. One big challenge was to connect these curved surfaces to the flat surface at the bottom and be able to union it properly. However as you can see below it is feasible with CadQuery. The next step will be to feed this into Fenics.
I started a fresh conda install on Debian 11 following these steps:
but then I get a never ending solve environment with a ton of conflicts and failed install at the end. The install is flawless though with
conda install -c conda-forge -c cadquery cadquery
but then I get 2.1 version with OCP 7.4 only. Has anybody encountered the same issue?