Dolfinx & conda environment

Good morning,

I would like to use Dolfinx for topology optimisation. I successfully installed FEniCSx system-wide by

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install fenicsx

(see here)

I would like to use it inside a Conda environnement, but when I select on VS Code the interpreter from the conda environment ~/miniconda3/envs/myenv/bin/python, it doesn’t find dolfinx, but if i select /bin/python3 it works. Is there a workaround or do I have to reinstall my other packages system-wide and work with no conda environment ?

Please excuse me if my question is basic but I am not at all an IT guy.

Thanks in advance.

I would suggest to use dolfinx inside docker container extension of VS code, shown here:

In that way all the packages you need are included in the docker image that you pull.

Hi @festv , what’s your motivation for using a conda environment on this system? If fenicsx is already installed and running with the system python, then why not use that?

thanks, i’ll look there then

well it looked simpler to me to use conda environments to avoid potential conflicts as I used to do with legacy FEniCS

The purpose of the debian packages (used by Ubuntu and PPA) is to provide a self-consistent package environment. If you experience any conflicts then please report them as bugs.

1 Like

thanks, i’ll notice the dev team if it happens