# Error when using different versions of fenicsx in separate conda environments

**URL:** <https://fenicsproject.discourse.group/t/error-when-using-different-versions-of-fenicsx-in-separate-conda-environments/15390>\
**Category:** General\
**Tags:** conda\
**Created:** [July 30, 2024, 3:19pm UTC](https://fenicsproject.discourse.group/t/error-when-using-different-versions-of-fenicsx-in-separate-conda-environments/15390 "2024-07-30T15:19:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mg-tub](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@mg-tub](https://fenicsproject.discourse.group/u/mg-tub)\
**Post date:** [July 30, 2024, 3:19pm UTC](https://fenicsproject.discourse.group/t/error-when-using-different-versions-of-fenicsx-in-separate-conda-environments/15390/1 "2024-07-30T15:19:14Z")

</div>

I have an issue with some code I have written, that runs perfectly on fenicsx 0.8 installed via conda. I brought that code to another PC which had 0.7.2 so I installed a new environment with fenicsx 0.8. I would like to keep the old environment so my old code still runs (its the idea behind environments afaik).

In the new environment I get cpp errors. I can’t generate the mesh. I suspect it is some kind of installation error. With:

```auto
from dolfinx import mesh 
from mpi4py import MPI         
mesh.create_unit_square(MPI.COMM_WORLD, 10, 10)

```

I get:

```auto
terminate called after throwing an instance of 'nanobind::python_error'
  what(): AttributeError: type object 'dolfinx.cpp.mesh.CellType' has no attribute ' __qualname__'

```

Is there a way to do this correctly so I can keep both installations? Am I right that this is actually stemming from having both installed simultaneously?

---

<div class="post-metadata">

**Author:** ![francesco-ballarin](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@francesco-ballarin](https://fenicsproject.discourse.group/u/francesco-ballarin)\
**Post date:** [July 30, 2024, 4:59pm UTC](https://fenicsproject.discourse.group/t/error-when-using-different-versions-of-fenicsx-in-separate-conda-environments/15390/2 "2024-07-30T16:59:27Z")

</div>

See [Error in model\_to\_mesh - #7 by jiyeonkim.temp](https://fenicsproject.discourse.group/t/error-in-model-to-mesh/15375/7)

---

<div class="post-metadata">

**Author:** ![mg-tub](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@mg-tub](https://fenicsproject.discourse.group/u/mg-tub)\
**Post date:** [August 2, 2024, 7:51am UTC](https://fenicsproject.discourse.group/t/error-when-using-different-versions-of-fenicsx-in-separate-conda-environments/15390/3 "2024-08-02T07:51:00Z")

</div>

thanks that was it. Is there a way to set up the conda package so it requires the older version?

---

<div class="post-metadata">

**Author:** ![francesco-ballarin](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@francesco-ballarin](https://fenicsproject.discourse.group/u/francesco-ballarin)\
**Post date:** [August 3, 2024, 8:34am UTC](https://fenicsproject.discourse.group/t/error-when-using-different-versions-of-fenicsx-in-separate-conda-environments/15390/4 "2024-08-03T08:34:32Z")

</div>

don’t know how to do that, cc @minrk

---

<div class="post-metadata">

**Author:** ![SGVen24](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/sgven24/32/7357_2.png) [@SGVen24](https://fenicsproject.discourse.group/u/SGVen24)\
**Post date:** [August 5, 2024, 1:33am UTC](https://fenicsproject.discourse.group/t/error-when-using-different-versions-of-fenicsx-in-separate-conda-environments/15390/5 "2024-08-05T01:33:06Z")

</div>

Hi All,  
I have the same error even though my mpi4py is version 3.1.6. Also, I only have one version of fenicsx 0.8. I’m trying to run the first tutorial

 ![image](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/5/5581cf23fb7ea83540fb870d4a41dd6c68bf5c8d.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/4/475834ea43cbdef14cbf12cf10a3e97e52baa44a.png)

I’m running python 3.12.4 and Fenicsx packaged by conda-forge (installation method as listed in [fenicsx – Nguyen Lab Wiki](https://me.jhu.edu/nguyenlab/doku.php?id=fenicsx))  
on  
Operating System: Ubuntu 22.04.4 LTS  
Kernel: Linux 5.15.153.1-microsoft-standard-WSL2  
Architecture: x86-64 on a Windows 11 pro.

Please help.

Srikanth

---

<div class="post-metadata">

**Author:** ![minrk](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/minrk/32/3866_2.png) [@minrk](https://fenicsproject.discourse.group/u/minrk)\
**Post date:** [August 5, 2024, 12:46pm UTC](https://fenicsproject.discourse.group/t/error-when-using-different-versions-of-fenicsx-in-separate-conda-environments/15390/6 "2024-08-05T12:46:12Z")

</div>

The package metadata was fixed on fenics-dolfin, it should be [fixed on fenics-dolfinx shortly](https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/817)
