Error :No module named `dolfinx` on anaconda

Hi,all

I want to install dolfinx on anaconda.(I use anaconda on MacOS)
I tried the following command,

import gmsh
import numpy as np
import pyvista
import dolfinx

from dolfinx.fem import (Constant, dirichletbc, Function, FunctionSpace, assemble_scalar,
form, locate_dofs_geometrical, locate_dofs_topological)
from dolfinx.fem.petsc import LinearProblem
from dolfinx.io import XDMFFile
from dolfinx.mesh import create_unit_square, locate_entities
from dolfinx.plot import create_vtk_mesh

But I cant install dolfinx and following this error appeared. Error:No module named dolfinx`

So,I use the command conda install -c conda-forge fenics-dolfinx on anaconda.
But I can`t install dolfinx and appear this message.

Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.

How can I install dolfinx on anaconda?

thank you in advance for your help!

This worked for me on a mac: GitHub - FEniCS/dolfinx: Next generation FEniCS problem solving environment

Thank you puhl!

I want to know how did you install dolfinx.

Did you use the following command on anaconda?

conda create -n fenicsx-env
conda activate fenicsx-env
conda install -c conda-forge fenics-dolfinx mpich pyvista

if you can teach me,I want to know.

thanks,

These commands work on my Mac too.

As these commands work on other people’s mac’s it would be good if you could put the full trace (copy your input commands, and the corresponding output) and put it in markdown format, i.e.

```bash
root@dokken-XPS-9320:~/shared/test# python3 -m pytest test 
=========================================================================================================== test session starts ============================================================================================================
platform linux -- Python 3.10.4, pytest-7.1.3, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /root/shared, configfile: pyproject.toml
plugins: cov-4.0.0, anyio-3.6.2, xdist-2.5.0, forked-1.4.0
collected 0 items                                                                                                                                                                                                                          

========================================================================================================== no tests ran in 0.01s ===========================================================================================================
ERROR: file or directory not found: test

```

Sorry for long leave.
I could solve this problem!
thank you for your help!