Configuring Dolfinx in PyCharm

Hello, I’m trying to use the newest version of dolfinx in PyCharm. When trying to pull the dolfinx image using powershell I get:

Using default tag: latest
Error response from daemon: manifest for dolfinx/dolfinx:latest not found: manifest unknown: manifest unknown
  1. Why does this error occur?

In PyCharm I tried to configure an environment deployed in a corresponding Docker container as described here. Following the instructions given by FenicsX in PyCharm I noticed that I don’t have \usr\local\lib\python3.10\dist-packages on my system.

  1. Do I need to create dist-packages manually?

I’m using Windows 11 and Python 3.10. I’m sort of stuck here so I would appreciate any help. Thank’s.

Hi,

I’m not using docker for dolfinx, so I might be wrong.
However, according to @jackhale ’s post on slack,

We have made the following changes to the DOLFINx Docker images (dolfinx/dolfinx, dolfinx/lab and dolfinx/dev-env).
We no longer will push :latest tags. Instead, users should choose between :stable (the latest stable release of DOLFINx) and :nightly (images built nightly from the current main branches). There are also versioned tags e.g. :v0.4.1-r1. We will remove the :latest tags in 30 days and there will be no new image pushes to :latest from today.
1:42
In addition, we will be “recommending” conda for general use and Spack for HPC installs of DOLFINx. We will be continuing to maintain Docker images, Ubuntu packages, Debian packages and source installs as first-party options.

So maybe using :stable tag would work?

Hey Kei, when I try docker pull dolfinx/dolfinx:stable I get

docker pull dolfinx/dolfinx:stable
stable: Pulling from dolfinx/dolfinx
d19f32bd9e41: Pull complete 
4f4fb700ef54: Pull complete 
855ab12da747: Pull complete 
817f304a786d: Pull complete 
ad31d547c4fa: Pull complete 
5e7311608b7f: Pull complete 
03b896a421c6: Pull complete 
6918cdb990ab: Pull complete 
f4654c21976f: Pull complete 
b1e31cb34545: Pull complete 
48e5a8370124: Pull complete 
5ab09367c15e: Pull complete 
3f0175c3521d: Pull complete 
03331ccd2afa: Pull complete 
Digest: sha256:1d6f1589082314b1f239efb8dfc85d7245c20d05c67754e91400a8c82bc64e74
Status: Downloaded newer image for dolfinx/dolfinx:stable

so it seems to work. Thank’s for that.

Another error occurred when I tried to configure the dolfinx/dolfinx:stable image as python interpreter:

failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: \"python\": executable file not found in $PATH: unknown

I think this is somehow related to the missing dist-packages directory mentioned here.

Ok found the solution already here . The python interpreter path when configuring a docker image as remote interpreter has to be named python3 (naming it just python created the above error).

Still when I run an example script for fenicsx Implementation — FEniCSx tutorial I get the following

from dolfinx import mesh, fem, plot, io
ModuleNotFoundError: No module named 'dolfinx'

Checking the remote interpreter I can tell there is no dolfinx package installed just fenics-dolfinx:

Answer to this is now here .