Installation of multiphenicsx

Hello,
I am trying to install multiphenicsx in the docker environment, which is used for dolfinx library.
The motivation for installation is to use the Lagrange multiplier method in the variational formulation.
I installed multiphenicsx using

!pip3 install "multiphenicsx@git+https://github.com/multiphenics/multiphenicsx.git@2ff1154"

inside the jupyter notebook.
By doing so, I could successfully run the command

import multiphenicsx

However, failed with

import multiphenicsx.fem

with following error :

/usr/local/lib/python3.10/dist-packages/multiphenicsx/cpp/multiphenicsx/fem/DofMapRestriction.cpp: In member function ‘void multiphenicsx::fem::DofMapRestriction::_compute_cell_dofs(std::shared_ptr<const dolfinx::fem::DofMap>)’:
/usr/local/lib/python3.10/dist-packages/multiphenicsx/cpp/multiphenicsx/fem/DofMapRestriction.cpp:213:41: error: ‘using element_type = const class dolfinx::fem::DofMap’ {aka ‘const class dolfinx::fem::DofMap’} has no member named ‘map’
  213 |   auto unrestricted_cell_dofs = dofmap->map();
      |                                         ^~~
/usr/local/lib/python3.10/dist-packages/multiphenicsx/cpp/multiphenicsx/fem/DofMapRestriction.cpp:217:48: error: ‘std::experimental’ has not been declared
  217 |     const auto unrestricted_cell_dofs_c = std::experimental::submdspan(
      |                                                ^~~~~~~~~~~~
/usr/local/lib/python3.10/dist-packages/multiphenicsx/cpp/multiphenicsx/fem/DofMapRestriction.cpp:218:39: error: ‘std::experimental’ has not been declared
  218 |       unrestricted_cell_dofs, c, std::experimental::full_extent);
      |                                       ^~~~~~~~~~~~
---------------------------------------------------------------------------
DistutilsExecError                        Traceback (most recent call last)
File /usr/lib/python3.10/distutils/unixccompiler.py:117, in UnixCCompiler._compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts)
    116 try:
--> 117     self.spawn(compiler_so + cc_args + [src, '-o', obj] +
    118                extra_postargs)
    119 except DistutilsExecError as msg:

File /usr/lib/python3.10/distutils/ccompiler.py:910, in CCompiler.spawn(self, cmd)
    909 def spawn(self, cmd):
--> 910     spawn(cmd, dry_run=self.dry_run)

File /usr/lib/python3.10/distutils/spawn.py:91, in spawn(cmd, search_path, verbose, dry_run)
     90     cmd = cmd[0]
---> 91 raise DistutilsExecError(
     92       "command %r failed with exit code %s" % (cmd, exitcode))

DistutilsExecError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

During handling of the above exception, another exception occurred:

CompileError                              Traceback (most recent call last)
File /usr/lib/python3.10/distutils/core.py:148, in setup(**attrs)
    147 try:
--> 148     dist.run_commands()
    149 except KeyboardInterrupt:

File /usr/lib/python3.10/distutils/dist.py:966, in Distribution.run_commands(self)
    965 for cmd in self.commands:
--> 966     self.run_command(cmd)

File /usr/lib/python3.10/distutils/dist.py:985, in Distribution.run_command(self, command)
    984 cmd_obj.ensure_finalized()
--> 985 cmd_obj.run()
    986 self.have_run[command] = 1

File /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:79, in build_ext.run(self)
     78 old_inplace, self.inplace = self.inplace, 0
---> 79 _build_ext.run(self)
     80 self.inplace = old_inplace

File /usr/lib/python3.10/distutils/command/build_ext.py:340, in build_ext.run(self)
    339 # Now actually compile and link everything.
--> 340 self.build_extensions()

File /usr/lib/python3.10/distutils/command/build_ext.py:449, in build_ext.build_extensions(self)
    448 else:
--> 449     self._build_extensions_serial()

File /usr/lib/python3.10/distutils/command/build_ext.py:474, in build_ext._build_extensions_serial(self)
    473 with self._filter_build_errors(ext):
--> 474     self.build_extension(ext)

File /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:202, in build_ext.build_extension(self, ext)
    201     self.compiler = self.shlib_compiler
--> 202 _build_ext.build_extension(self, ext)
    203 if ext._needs_stub:

File /usr/lib/python3.10/distutils/command/build_ext.py:529, in build_ext.build_extension(self, ext)
    527     macros.append((undef,))
--> 529 objects = self.compiler.compile(sources,
    530                                  output_dir=self.build_temp,
    531                                  macros=macros,
    532                                  include_dirs=ext.include_dirs,
    533                                  debug=self.debug,
    534                                  extra_postargs=extra_args,
    535                                  depends=ext.depends)
    537 # XXX outdated variable, kept here in case third-part code
    538 # needs it.

File /usr/lib/python3.10/distutils/ccompiler.py:574, in CCompiler.compile(self, sources, output_dir, macros, include_dirs, debug, extra_preargs, extra_postargs, depends)
    573         continue
--> 574     self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
    576 # Return *all* object filenames, not just the ones we just built.

File /usr/lib/python3.10/distutils/unixccompiler.py:120, in UnixCCompiler._compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts)
    119 except DistutilsExecError as msg:
--> 120     raise CompileError(msg)

CompileError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

During handling of the above exception, another exception occurred:

SystemExit                                Traceback (most recent call last)
    [... skipping hidden 1 frame]

Cell In[6], line 2
      1 import multiphenicsx
----> 2 import multiphenicsx.fem

File /usr/local/lib/python3.10/dist-packages/multiphenicsx/fem/__init__.py:9
      6 """Tools for assembling finite element forms with restrictions."""
----> 9 import multiphenicsx.fem.petsc  # import module rather than its content to be consistent with dolfinx.fem.petsc
     10 from multiphenicsx.fem.dofmap_restriction import DofMapRestriction

File /usr/local/lib/python3.10/dist-packages/multiphenicsx/fem/petsc.py:21
     19 import petsc4py.PETSc
---> 21 from multiphenicsx.cpp import cpp_library as mcpp
     23 DolfinxConstantsType = np.typing.NDArray[petsc4py.PETSc.ScalarType]

File /usr/local/lib/python3.10/dist-packages/multiphenicsx/cpp/__init__.py:15
     13 from multiphenicsx.cpp.compile_package import compile_package
---> 15 cpp_library = compile_package(
     16     mpi4py.MPI.COMM_WORLD,
     17     "multiphenicsx",
     18     os.path.dirname(os.path.abspath(__file__)),
     19     # Files are manually sorted to handle dependencies
     20     "fem/DofMapRestriction.cpp",
     21     "fem/sparsitybuild.cpp",
     22     "fem/petsc.cpp",
     23     "fem/utils.cpp",
     24     "la/petsc.cpp"
     25 )

File /usr/local/dolfinx-real/lib/python3.10/dist-packages/dolfinx/jit.py:56, in mpi_jit_decorator.<locals>.mpi_jit(comm, *args, **kwargs)
     55 if comm.size == 1:
---> 56     return local_jit(*args, **kwargs)
     58 # Default status (0 == ok, 1 == fail)

File /usr/local/lib/python3.10/dist-packages/multiphenicsx/cpp/compile_package.py:85, in compile_package(package_name, package_root, *args, **kwargs)
     84 # Compile C++ module and return
---> 85 return compile_code(package_name, package_file, **kwargs)

File /usr/local/lib/python3.10/dist-packages/multiphenicsx/cpp/compile_code.py:109, in compile_code(package_name, package_file, **kwargs)
    108 # Return module generated by cppimport
--> 109 return cppimport.imp(package_name_with_hash)

File /usr/local/lib/python3.10/dist-packages/cppimport/__init__.py:50, in imp(fullname, opt_in)
     49 filepath = find_module_cpppath(fullname, opt_in)
---> 50 return imp_from_filepath(filepath, fullname)

File /usr/local/lib/python3.10/dist-packages/cppimport/__init__.py:87, in imp_from_filepath(filepath, fullname)
     86 if is_build_needed(module_data) or not try_load(module_data):
---> 87     build_safely(filepath, module_data)
     88 load_module(module_data)

File /usr/local/lib/python3.10/dist-packages/cppimport/importer.py:36, in build_safely(filepath, module_data)
     35             break
---> 36         template_and_build(filepath, module_data)
     37 except filelock.Timeout:

File /usr/local/lib/python3.10/dist-packages/cppimport/importer.py:62, in template_and_build(filepath, module_data)
     61 run_templating(module_data)
---> 62 build_module(module_data)
     63 checksum_save(module_data)

File /usr/local/lib/python3.10/dist-packages/cppimport/build_module.py:84, in build_module(module_data)
     83     with contextlib.redirect_stderr(f):
---> 84         setuptools.setup(**setuptools_args)
     85 logger.debug(f"Setuptools/compiler output: {f.getvalue()}")

File /usr/lib/python3/dist-packages/setuptools/__init__.py:153, in setup(**attrs)
    152 _install_setup_requires(attrs)
--> 153 return distutils.core.setup(**attrs)

File /usr/lib/python3.10/distutils/core.py:163, in setup(**attrs)
    162         else:
--> 163             raise SystemExit("error: " + str(msg))
    165 return dist

SystemExit: error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

During handling of the above exception, another exception occurred:

AssertionError                            Traceback (most recent call last)
    [... skipping hidden 1 frame]

File /usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py:2047, in InteractiveShell.showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code)
   2044 if exception_only:
   2045     stb = ['An exception has occurred, use %tb to see '
   2046            'the full traceback.\n']
-> 2047     stb.extend(self.InteractiveTB.get_exception_only(etype,
   2048                                                      value))
   2049 else:
   2050     try:
   2051         # Exception classes can customise their traceback - we
   2052         # use this in IPython.parallel for exceptions occurring
   2053         # in the engines. This should return a list of strings.

File /usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py:585, in ListTB.get_exception_only(self, etype, value)
    577 def get_exception_only(self, etype, value):
    578     """Only print the exception type and message, without a traceback.
    579 
    580     Parameters
   (...)
    583     value : exception value
    584     """
--> 585     return ListTB.structured_traceback(self, etype, value)

File /usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py:452, in ListTB.structured_traceback(self, etype, evalue, etb, tb_offset, context)
    449     chained_exc_ids.add(id(exception[1]))
    450     chained_exceptions_tb_offset = 0
    451     out_list = (
--> 452         self.structured_traceback(
    453             etype, evalue, (etb, chained_exc_ids),
    454             chained_exceptions_tb_offset, context)
    455         + chained_exception_message
    456         + out_list)
    458 return out_list

File /usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py:1118, in AutoFormattedTB.structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
   1116 else:
   1117     self.tb = tb
-> 1118 return FormattedTB.structured_traceback(
   1119     self, etype, value, tb, tb_offset, number_of_lines_of_context)

File /usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py:1012, in FormattedTB.structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
   1009 mode = self.mode
   1010 if mode in self.verbose_modes:
   1011     # Verbose modes need a full traceback
-> 1012     return VerboseTB.structured_traceback(
   1013         self, etype, value, tb, tb_offset, number_of_lines_of_context
   1014     )
   1015 elif mode == 'Minimal':
   1016     return ListTB.get_exception_only(self, etype, value)

File /usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py:865, in VerboseTB.structured_traceback(self, etype, evalue, etb, tb_offset, number_of_lines_of_context)
    856 def structured_traceback(
    857     self,
    858     etype: type,
   (...)
    862     number_of_lines_of_context: int = 5,
    863 ):
    864     """Return a nice text document describing the traceback."""
--> 865     formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
    866                                                            tb_offset)
    868     colors = self.Colors  # just a shorthand + quicker name lookup
    869     colorsnormal = colors.Normal  # used a lot

File /usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py:799, in VerboseTB.format_exception_as_a_whole(self, etype, evalue, etb, number_of_lines_of_context, tb_offset)
    796 assert isinstance(tb_offset, int)
    797 head = self.prepare_header(etype, self.long_header)
    798 records = (
--> 799     self.get_records(etb, number_of_lines_of_context, tb_offset) if etb else []
    800 )
    802 frames = []
    803 skipped = 0

File /usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py:854, in VerboseTB.get_records(self, etb, number_of_lines_of_context, tb_offset)
    848     formatter = None
    849 options = stack_data.Options(
    850     before=before,
    851     after=after,
    852     pygments_formatter=formatter,
    853 )
--> 854 return list(stack_data.FrameInfo.stack_data(etb, options=options))[tb_offset:]

File /usr/local/lib/python3.10/dist-packages/stack_data/core.py:578, in FrameInfo.stack_data(cls, frame_or_tb, options, collapse_repeated_frames)
    562 @classmethod
    563 def stack_data(
    564         cls,
   (...)
    568         collapse_repeated_frames: bool = True
    569 ) -> Iterator[Union['FrameInfo', RepeatedFrames]]:
    570     """
    571     An iterator of FrameInfo and RepeatedFrames objects representing
    572     a full traceback or stack. Similar consecutive frames are collapsed into RepeatedFrames
   (...)
    576     and optionally an Options object to configure.
    577     """
--> 578     stack = list(iter_stack(frame_or_tb))
    580     # Reverse the stack from a frame so that it's in the same order
    581     # as the order from a traceback, which is the order of a printed
    582     # traceback when read top to bottom (most recent call last)
    583     if is_frame(frame_or_tb):

File /usr/local/lib/python3.10/dist-packages/stack_data/utils.py:97, in iter_stack(frame_or_tb)
     95 while frame_or_tb:
     96     yield frame_or_tb
---> 97     if is_frame(frame_or_tb):
     98         frame_or_tb = frame_or_tb.f_back
     99     else:

File /usr/local/lib/python3.10/dist-packages/stack_data/utils.py:90, in is_frame(frame_or_tb)
     89 def is_frame(frame_or_tb: Union[FrameType, TracebackType]) -> bool:
---> 90     assert_(isinstance(frame_or_tb, (types.FrameType, types.TracebackType)))
     91     return isinstance(frame_or_tb, (types.FrameType,))

File /usr/local/lib/python3.10/dist-packages/stack_data/utils.py:176, in assert_(condition, error)
    174 if isinstance(error, str):
    175     error = AssertionError(error)
--> 176 raise error

AssertionError: 

To summarize, it seems that an error occurred at :

File /usr/lib/python3/dist-packages/setuptools/__init__.py:153, in setup(**attrs)
    152 _install_setup_requires(attrs)
--> 153 return distutils.core.setup(**attrs)

File /usr/lib/python3.10/distutils/core.py:163, in setup(**attrs)
    162         else:
--> 163             raise SystemExit("error: " + str(msg))
    165 return dist

SystemExit: error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

I searched for the error above and many suggested using

sudo apt-get install python3-dev

So, I tried this before initiating docker environment but nothing changed. Should I try something inside the docker environment?

Thanks for reading.

See Installation — multiphenicsx

Dear fballarin,
Thanks for your reply.
In your suggested link, there is compatibility check code :

git checkout {commit SHA}

However, one thing I am confused is that I used docker environment instead of git clone installation. So, I am not sure how, and where to use this code.
Could you give me some comments?
Thanks!

You can get the commit SHA from Commits · multiphenics/multiphenicsx · GitHub and simply copy it in the line you already have in your notebook

!pip3 install "multiphenicsx[tutorials]@git+https://github.com/multiphenics/multiphenicsx.git@COMMIT_SHA"

Dear fballarin,
Thanks for your kind explanation.
Your code works in the docker environment. Now, when I ran the code :

Collecting multiphenicsx[tutorials]@ git+https://github.com/multiphenics/multiphenicsx.git@COMMIT_SHA
  Cloning https://github.com/multiphenics/multiphenicsx.git (to revision COMMIT_SHA) to /tmp/pip-install-5fwxzsny/multiphenicsx_2a2be2df852a4da285f0cef68b599cd2
  Running command git clone --filter=blob:none --quiet https://github.com/multiphenics/multiphenicsx.git /tmp/pip-install-5fwxzsny/multiphenicsx_2a2be2df852a4da285f0cef68b599cd2
  WARNING: Did not find branch or tag 'COMMIT_SHA', assuming revision or ref.
  Running command git checkout -q COMMIT_SHA
  error: pathspec 'COMMIT_SHA' did not match any file(s) known to git
  error: subprocess-exited-with-error
  
  × git checkout -q COMMIT_SHA did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git checkout -q COMMIT_SHA did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

The resultant error was like this. Seems I had an incomplete condition for the installation of multiphenics.
What should I do to fix this issue?

Always thanks.

Of course, you must replace the text COMMIT_SHA with an appropriate value, that you should obtain as described on the website.

Dear fballarin,
Thanks for your kind explanation, I could use the code :

!pip3 install "multiphenicsx[tutorials]@git+https://github.com/multiphenics/multiphenicsx.git@2ff11547879dd859cbe25dbf5224771d2af63508"

from the link you posted, replacing the commit code.(from dolfinx::la::SparsityPattern::assemble method has been renamed to fin… · multiphenics/multiphenicsx@2ff1154 · GitHub)

The console message seems that it is installed well :

Collecting multiphenicsx[tutorials]@ git+https://github.com/multiphenics/multiphenicsx.git@2ff11547879dd859cbe25dbf5224771d2af63508
  Cloning https://github.com/multiphenics/multiphenicsx.git (to revision 2ff11547879dd859cbe25dbf5224771d2af63508) to /tmp/pip-install-lx9be0q4/multiphenicsx_ca3790ac1f9949c4bc9daf9d62f12740
  Running command git clone --filter=blob:none --quiet https://github.com/multiphenics/multiphenicsx.git /tmp/pip-install-lx9be0q4/multiphenicsx_ca3790ac1f9949c4bc9daf9d62f12740
  Running command git rev-parse -q --verify 'sha^2ff11547879dd859cbe25dbf5224771d2af63508'
  Running command git fetch -q https://github.com/multiphenics/multiphenicsx.git 2ff11547879dd859cbe25dbf5224771d2af63508
  Resolved https://github.com/multiphenics/multiphenicsx.git to commit 2ff11547879dd859cbe25dbf5224771d2af63508
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting nbvalx[notebooks]@ git+https://github.com/multiphenics/nbvalx.git
  Cloning https://github.com/multiphenics/nbvalx.git to /tmp/pip-install-lx9be0q4/nbvalx_b87ca329be0d4357b47721ca49fd0373
  Running command git clone --filter=blob:none --quiet https://github.com/multiphenics/nbvalx.git /tmp/pip-install-lx9be0q4/nbvalx_b87ca329be0d4357b47721ca49fd0373
  Resolved https://github.com/multiphenics/nbvalx.git to commit cfa21a16c97a406375733484f1f0c934dfd24835
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting viskex@ git+https://github.com/viskex/viskex.git
  Cloning https://github.com/viskex/viskex.git to /tmp/pip-install-lx9be0q4/viskex_5967c2565c0a43e48a0c480394c86573
  Running command git clone --filter=blob:none --quiet https://github.com/viskex/viskex.git /tmp/pip-install-lx9be0q4/viskex_5967c2565c0a43e48a0c480394c86573
  Resolved https://github.com/viskex/viskex.git to commit 8895f22213cf341ca740031fa0c12dbe0ff7d556
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: petsc4py in /usr/local/lib/python3.10/dist-packages (from multiphenicsx[tutorials]@ git+https://github.com/multiphenics/multiphenicsx.git@2ff11547879dd859cbe25dbf5224771d2af63508) (3.17.5)
...
Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.10/dist-packages (from beautifulsoup4->nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets->viskex@ git+https://github.com/viskex/viskex.git->multiphenicsx[tutorials]@ git+https://github.com/multiphenics/multiphenicsx.git@2ff11547879dd859cbe25dbf5224771d2af63508) (2.3.2.post1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

but still same error occurs when I import multiphenics.fem

Quite suspicious in this error part :

error: ‘using element_type = const class dolfinx::fem::DofMap’ {aka ‘const class dolfinx::fem::DofMap’} has no member named ‘map’

cause I can run dolfinx without any error in docker environment.
Am I still missing something?

Always thanks for your help.

The whole point of this is to not use the latest multiphenicsx commit, since you surely are on an older dolfinx version.

Type this

!python3 -c "import dolfinx; print(dolfinx.common.git_commit_hash)"

find the corresponding hash in Commits · FEniCS/dolfinx · GitHub. Look at the date, and then get a commit hash at a similar date in Commits · multiphenics/multiphenicsx · GitHub

1 Like

Dear fballarin,
Thanks for your help!
I installed with older version of multifenicsx and it works with my dolfinx. My dolfinx version was 0.6.0 in jupyter lab environment, which is older than the latest version 0.7.0.

For those who do similar works, I leave the link :
(Ubuntu packages append scalar type to dolfinx pkg-config file · multiphenics/multiphenicsx@b80f047 · GitHub)

Thanks again :grinning:

Hello Francesco, I am trying to install viskex. But I am using 0.6.0 of DOLFINx. It seems current version of Viskex only support 0.7.0 (dev version). When I try to

import viskex

i got

module 'dolfinx.fem' has no attribute 'FunctionSpaceBase'

Is there any way to use this package on 0.6.0?

Make sure to follow Installation — multiphenicsx

I believe that the following commit

works for dolfinx 0.6.0.

Notice that the version at that commit does not require viskex, because I started developing viskex afterwards (March 2023).

Thank you very much for you quick reply. I installed multiphenicsx successfully for my DOLFINx 0.6.0 and could run

import multiphenicsx

without any issue. I also want to ask if I want to use viskex, is the only option for me to install DOLFINx 0.7.0?

Yes, viskex does not work for 0.6.0, only for 0.7.0. dolfinx 0.7.0 is getting packaged for conda and ubuntu literally in the last two days, so keep an eye out on the appropriate channels because early next week you may see new packages shipping 0.7.0.

Thank you for the information! I am looking forward to that. If not I will install 0.7.0 myself. Last time I failed and resorted to 0.6.0. Hopefully it won’t happen again. From my current searching I am going to use your multiphenicsx and viskex along with FEniCSx to explore how to solve coupled equations and hopefully can get our equations solved in the end.

FYI, I greatly simplified the instructions reported on our website for what concerns installing multiphenicsx against a fixed dolfinx release. Future readers may want to refer to the updated website, rather than the comments in the discussion above.

2 Likes

Just a note for MacOS: zsh is the default shell and so the installation script doesn’t work, but this is easily fixed by starting a bash session within a zsh session

On zsh you probably need to add single quotes like this

python3 -m pip install --check-build-dependencies --no-build-isolation '.[tutorials]'

I’ll update the instructions on the website, but in the meantime please let me know if that actually works for you.

Hello, I’ve been using fenicsx with a conda environment and now I’m trying to install multiphenicsx in this environment. I’ve followed the steps that are posted on the installation guide but when I execute the script it gives this error:

cd multiphenicsx
DOLFINX_VERSION=$(python3 -c 'import dolfinx; print(dolfinx.__version__)')
git checkout dolfinx-v${DOLFINX_VERSION}
if [ -f setup.cfg ]; then
    python3 -m pip install '.[tutorials]'
else
    python3 -m pip install --check-build-dependencies --no-build-isolation '.[tutorials]'
fi
Ya en 'dolfinx-v0.8.0'
Tu rama está actualizada con 'origin/dolfinx-v0.8.0'.
Processing /home/delfincalles/Escritorio/MANU/TER/Code/multiphenicsx
ERROR: Some build dependencies for file:///home/delfincalles/Escritorio/MANU/TER/Code/multiphenicsx are missing: 'nanobind >= 1.8.0', 'scikit-build-core[pyproject]'.

Any help on what I’m doing wrong is really appreciated.

The error message says it all

ERROR: Some build dependencies for file:///home/delfincalles/Escritorio/MANU/TER/Code/multiphenicsx are missing: 'nanobind >= 1.8.0', 'scikit-build-core[pyproject]'.

Please check how to install those with conda.

1 Like

Tank you for answering so quick. I did what you suggested and everything works fine now.