# Installing 2.0a8 in a venv environment

**URL:** <https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138>\
**Category:** User Support\
**Tags:** festim2\
**Created:** [September 5, 2025, 5:19pm UTC](https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138 "2025-09-05T17:19:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![YehorYudin](https://avatars.discourse-cdn.com/v4/letter/y/51bf81/32.png) [@YehorYudin](https://festim.discourse.group/u/YehorYudin)\
**Post date:** [September 5, 2025, 5:19pm UTC](https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138/1 "2025-09-05T17:19:32Z")

</div>

Hi all, I was using a`conda`installation of FESTIM 2.0a8 for a while, but the package with which I use FESTIM now supports only `venv` virtual environments. (I am doing UQ for FESTIM, which underneath runs many parametrised instances of the code in a single resource allocation governed by a pilot job mechanism.)

I see that the FESTIM 2.0 [toml](https://github.com/festim-dev/FESTIM/blob/2b5567f84ef8d4f5413c38b70325b2158e4083e4/pyproject.toml#L16C25-L16C41) file requires `scifem>=0.2.13` version, however, it seems that scifem cannot recognise the FEniCSx installation done via `apt`, like it is written [here](https://github.com/FEniCS/dolfinx?tab=readme-ov-file#ubuntu-packages).

If I am installing `scifem` arbitrarily, via `pip install scifem`, pip will go down to the `scifem-0.1.0` version. If I am trying to install a specific `>=0.2` version, it will fail due to an unfound dependency:

> ERROR: Could not find a version that satisfies the requirement fenics-dolfinx (from versions: none)  
> ERROR: No matching distribution found for fenics-dolfinx

Installing FESTIM from pip via `pip install FESTIM==2.0a8` into a fresh `venv` environment would break at the scifem installation stage, due to none of its versions finding its dependencies:

> INFO: pip is still looking at multiple versions of scifem to determine which version is compatible with other requirements. This could take a while.  
> ERROR: Cannot install FESTIM because these package versions have conflicting dependencies.
> 
> The conflict is caused by:  
> scifem 0.7.0 depends on fenics-dolfinx  
> scifem 0.6.0 depends on fenics-dolfinx  
> scifem 0.5.0 depends on fenics-dolfinx  
> scifem 0.4.0 depends on fenics-dolfinx  
> scifem 0.3.1 depends on fenics-dolfinx  
> scifem 0.3.0 depends on fenics-dolfinx  
> scifem 0.2.14 depends on fenics-dolfinx  
> scifem 0.2.13 depends on fenics-dolfinx

Running things in a Docker container is also an option for me, however, the installation via Docker does not seem to work, probably because FEniCS removed the image labelled as `stable` from the repository.

Has anyone encountered issues with installing the right scifem version? What would be the safest way of installing FESTIM 2.0.x dependencies without using conda?

---

<div class="post-metadata">

**Author:** ![jhdark](https://yyz2.discourse-cdn.com/free1/user_avatar/festim.discourse.group/jhdark/32/13_2.png) [@jhdark](https://festim.discourse.group/u/jhdark)\
**Post date:** [September 5, 2025, 5:33pm UTC](https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138/2 "2025-09-05T17:33:32Z")

</div>

Hi @YehorYudin

Do you mind providing all the steps (ie. first run this command, then run this command…) to reproduce your issue? It will greatly help in assisting you!

---

<div class="post-metadata">

**Author:** ![jhdark](https://yyz2.discourse-cdn.com/free1/user_avatar/festim.discourse.group/jhdark/32/13_2.png) [@jhdark](https://festim.discourse.group/u/jhdark)\
**Post date:** [September 5, 2025, 5:38pm UTC](https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138/3 "2025-09-05T17:38:49Z")

</div>

> [@YehorYudin](#):
>
> the package with which I use FESTIM now supports only `venv` virtual environments.

I don’t understand this. Can you share what package this is?

---

<div class="post-metadata">

**Author:** ![remidm](https://yyz2.discourse-cdn.com/free1/user_avatar/festim.discourse.group/remidm/32/4_2.png) [@remidm](https://festim.discourse.group/u/remidm)\
**Post date:** [September 5, 2025, 5:51pm UTC](https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138/4 "2025-09-05T17:51:51Z")

</div>

@YehorYudin I also don’t understand how a package can only support `venv`. `venv` is not a package manager.

You also have the option to use both conda and venv, but my guess is your package is available on pypi and can be installed with pip

---

<div class="post-metadata">

**Author:** ![YehorYudin](https://avatars.discourse-cdn.com/v4/letter/y/51bf81/32.png) [@YehorYudin](https://festim.discourse.group/u/YehorYudin)\
**Post date:** [September 5, 2025, 5:55pm UTC](https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138/5 "2025-09-05T17:55:49Z")

</div>

Hi James, thanks for getting back so quickly!

I was referring to the current standard built-in Python 3 package for virtual environments:

[docs.python.org/3/library/venv.html](https://docs.python.org/3/library/venv.html)

If someone can tell if the following three lines can work as a valid installation set-up for the latest (2.0.a8) version, that would be appreciated!:

> python3 -m venv festim2-venv-test
> 
> source festim2-venv-test/bin/activate
> 
> python3 -m pip install festim==2.0.a8

I am encountering an issue with the `scifem` installation on this stage:

> INFO: pip is still looking at multiple versions of scifem to determine which version is compatible with other requirements. This could take a while.  
> ERROR: Cannot install festim because these package versions have conflicting dependencies.
> 
> The conflict is caused by:  
> scifem 0.7.0 depends on fenics-dolfinx  
> scifem 0.6.0 depends on fenics-dolfinx  
> scifem 0.5.0 depends on fenics-dolfinx  
> scifem 0.4.0 depends on fenics-dolfinx  
> scifem 0.3.1 depends on fenics-dolfinx  
> scifem 0.3.0 depends on fenics-dolfinx  
> scifem 0.2.14 depends on fenics-dolfinx  
> scifem 0.2.13 depends on fenics-dolfinx

---

<div class="post-metadata">

**Author:** ![remidm](https://yyz2.discourse-cdn.com/free1/user_avatar/festim.discourse.group/remidm/32/4_2.png) [@remidm](https://festim.discourse.group/u/remidm)\
**Post date:** [September 5, 2025, 6:05pm UTC](https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138/6 "2025-09-05T18:05:08Z")

</div>

> [@YehorYudin](#):
>
> but the package with which I use FESTIM now supports only `venv` virtual environments.

You mention a package which only supports `venv` do you mind sharing what this package is?

---

<div class="post-metadata">

**Author:** ![remidm](https://yyz2.discourse-cdn.com/free1/user_avatar/festim.discourse.group/remidm/32/4_2.png) [@remidm](https://festim.discourse.group/u/remidm)\
**Post date:** [September 5, 2025, 6:19pm UTC](https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138/7 "2025-09-05T18:19:49Z")

</div>

> [@YehorYudin](#):
>
> If someone can tell if the following three lines can work as a valid installation set-up for the latest (2.0.a8) version

This alone will not install dolfinx properly (only the python bindings, you need all the C++ stuff that is not distributed via pypi).

I confirm that the following doesn’t work because you cannot mix `apt` and `pip` as they are completely different pacakge managers:

```auto
python3 -m venv festim2-venv-test
source festim2-venv-test/bin/activate

add-apt-repository ppa:fenics-packages/fenics
apt update
apt install fenicsx

python3 -m pip install festim==2.0.a8

```

If the issue is related to `scifem` then maybe this question is best posted [there](https://github.com/scientificcomputing/scifem/issues) where the scifem maintainers will help.

Again, if you share what UQ package you are using maybe we can help finding a solution for this.

---

<div class="post-metadata">

**Author:** ![remidm](https://yyz2.discourse-cdn.com/free1/user_avatar/festim.discourse.group/remidm/32/4_2.png) [@remidm](https://festim.discourse.group/u/remidm)\
**Post date:** [September 5, 2025, 6:28pm UTC](https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138/8 "2025-09-05T18:28:47Z")

</div>

@YehorYudin after chatting with @jorgendokken, if you _have_ to use `venv` then you have to build `dolfinx` from source. Which isn’t convenient at all.

`venv` is used in the [FEniCS docker images](https://github.com/FEniCS/dolfinx/blob/main/docker/Dockerfile.test-env#L157C5-L158C1) btw.

I would use a[fenics docker image](https://github.com/FEniCS/dolfinx?tab=readme-ov-file#docker-images) and then install festim in there

---

<div class="post-metadata">

**Author:** ![YehorYudin](https://avatars.discourse-cdn.com/v4/letter/y/51bf81/32.png) [@YehorYudin](https://festim.discourse.group/u/YehorYudin)\
**Post date:** [September 9, 2025, 6:25pm UTC](https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138/10 "2025-09-09T18:25:41Z")

</div>

Thank you for your suggestions, and sorry for not replying for a while!

I am using [EasyVVUQ](https://github.com/UCL-CCS/EasyVVUQ) for uncertainty quantification of a simple FESTIM model.

This is a non-intrusive approach, so it needs to run multiple instances of the same executable for different inputs, on a particular resource allocation. Here, I went for simply making a Python interpreter as the executable, which runs a script constructing and running a FESTIM model. I had a hard time setting up the workflow such that the software piece managing the multiple instances can specify the right environment for Python running FESTIM2.0.x

So far, it works locally with a `conda` environment. To do that, I resolved some local issues, though. We have a list of HPC resources available, and I am not sure, however, that we will not have issues with a virtual environment set-up on some of he local clusters later.

I would like to try running it in a docker, as FEniCSX has existing images posted, and the UQ software supports docker containerisation of the codes being run, but would depend on what whether it would be both reasonable and feasible on an HPC like ARCHER2.

But at the moment, I have no issues with working with FESTIM further. Thank you all for a prompt reaction!

---

<div class="post-metadata">

**Author:** ![remidm](https://yyz2.discourse-cdn.com/free1/user_avatar/festim.discourse.group/remidm/32/4_2.png) [@remidm](https://festim.discourse.group/u/remidm)\
**Post date:** [September 9, 2025, 6:46pm UTC](https://festim.discourse.group/t/installing-2-0a8-in-a-venv-environment/138/11 "2025-09-09T18:46:15Z")

</div>

Glad it now works! I see that `easyvvuq` is available via pip, so you should be able to just pip install it in a conda environment. no?

When it comes to HPC, conda isn’t really suitable for performance reasons.

I think you’d have to either/or:

- build dolfinx from source
- install dolfinx with spack or singularity (package managers better suited for HPC architectures)

We could also work on making a spack distribution for FESTIM. Feel free to [open an issue](https://github.com/festim-dev/FESTIM/issues/new?template=BLANK_ISSUE) for this!
