Fenics and tIGAr installation

Hello, I am currently working on Ubuntu 24.04.1 LTS with FEniCS version 2019.2.0.64.dev0 successfully installed. My objective is to use the tIGAr library for incorporating B-Splines as basis functions. My understanding is that tIGAr should be installed in a virtual environment to avoid conflicts, but please correct me if I’m wrong.

I have set up a virtual environment where I installed tIGAr version 2019.1 and attempted to reinstall FEniCS using pip install fenics. However, when running a tIGAr demo, I encounter an error indicating that the ‘dolfin’ module is missing.

Upon execution, I receive the following error message: ModuleNotFoundError: No module named ‘dolfin’

I would appreciate guidance on how to correctly install both FEniCS and tIGAr in a virtual environment. What are my options for resolving this issue? If there are specific details or further clarifications needed to better assist me, please let me know.

System Details:

  • FEniCS Version: 2019.2.0.64.dev0
  • Installation Method: pip install in a virtual environment
  • Platform: Ubuntu 24.04.1 LTS

Thank you for your assistance!

You can apt install fenics since you are on ubuntu. It will install it globally (and not in the local environment). For tIGAr you’ll have to check the info on their website/repository.

Thank you for your suggestion. I tried using sudo apt install fenics on Ubuntu, which successfully installed FEniCS. Interestingly, when I install FEniCS within a virtual environment using again ‘sudo apt install fenics’ or pip install fenics, it seems to only install FEniCS without the ‘dolfin’ module as well.

fenics 2019.1.0
fenics-dijitso 2019.1.0
fenics-ffc 2019.1.0.post0
fenics-fiat 2019.1.0
fenics-ufl 2019.1.0

As for the tIGAr installation, it proceeded without any issues and tIGAr is properly installed.

FEniCS is not pip installable, so it’s no surprise that such a command doesn’t work.

I create a new virtual enviroment. I install fenics with sudo apt install fenics globally

sudo apt install fenics
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
fenics is already the newest version (2:0.9.0.1~ppa1~noble1).

But still i get the same error that ModuleNotFoundError: No module named ‘dolfin’ when i try to import tIGAr.

Is there a way to install Fenics and make it work with tIGAr ?

I cant reproduce this with the following Dockerfile:

FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
    python3 \
    python3-pip \
    python3-dev \
    python3-setuptools \
    python3-wheel \
    python3-venv \
    software-properties-common  \
    git
RUN add-apt-repository ppa:fenics-packages/fenics && \
    apt-get update && \
    apt-get install -y fenics


RUN python3 -m pip install git+https://github.com/dalcinl/igakit.git --break-system-packages
RUN python3 -m pip install git+https://github.com/david-kamensky/tIGAr.git --break-system-packages

Built with

docker build -t tigar .
1 Like