It is not clear to me how to reinstall multiphenicsx. Following the instructions from
I try the command
DOLFINX_VERSION=$(python3 -c ‘import dolfinx; print(dolfinx.version)’)
and I get the response
(fenicsx9) dannyb@dannyslaptop:~/multiphenicsx$ DOLFINX_VERSION=$(python3 -c 'import dolfinx; print(dolfinx.__version__)')
Traceback (most recent call last):
File "<string>", line 1, in <module>
import dolfinx; print(dolfinx.__version__)
^^^^^^^^^^^^^^
File "/home/dannyb/anaconda3/envs/fenicsx9/lib/python3.13/site-packages/dolfinx/__init__.py", line 30, in <module>
from dolfinx import common
File "/home/dannyb/anaconda3/envs/fenicsx9/lib/python3.13/site-packages/dolfinx/common.py", line 11, in <module>
from dolfinx import cpp as _cpp
ImportError: libfmt.so.11: cannot open shared object file: No such file or directory
The part with DOLFINX_VERSION is just to get the right branch from the repo. I assume you have already done that earlier today (when you installed for the first time), so you can directly jump to the pip install line.
Still, having a library libfmt.so.11 that suddenly disappeared from your environment is not a good sign. You may want to reinstall it using similar instructions to the one that you were suggested above: try to find which conda package ships libfmt.so, double check if you have it already or not, and if not install it again.
Referring to the website https://fmt.dev/11.0/get-started/
I used the command
conda install -c conda-forge fmt
in an attempt top install the missing libfmt.so.11. I don’t know if this helped, but on reinstalling mutilphenicsx …
We are happy to help, but some of these questions are so basic that a simple search online would have given you the answer without waiting for us. Run pip uninstall nanobind.
My apologies. I realize that this is taking way too long. I suspect that one of the commands that was suggested above uninstalled 2.1 and reinstalled 2.2, but that is conjecture on my part. I will google some more and see if I can resolve this. It seems that there are some (to me arcane) rules about when to use pip and when to use conda, but I realize that ultimately it will be up to me to work through this stuff.
I appreciate your help, but there are some things I am not understanding that I fear will replicate themselves even if I start in a new environment. In particular
(fenicsx9) dannyb@dannyslaptop:~/multiphenicsx$ conda list nanobind
# packages in environment at /home/dannyb/anaconda3/envs/fenicsx9:
#
# Name Version Build Channel
fenics-basix-nanobind-abi 0.2.1.13 hacda0c5_1 conda-forge
nanobind 2.2.0 pypi_0 pypi
(fenicsx9) dannyb@dannyslaptop:~/multiphenicsx$ pip uninstall nanobind
Found existing installation: nanobind 2.1.0
Uninstalling nanobind-2.1.0:
Would remove:
/home/dannyb/anaconda3/envs/fenicsx9/lib/python3.13/site-packages/nanobind-2.1.0.dist-info/*
/home/dannyb/anaconda3/envs/fenicsx9/lib/python3.13/site-packages/nanobind/*
Would not remove (might be manually added):
/home/dannyb/anaconda3/envs/fenicsx9/lib/python3.13/site-packages/nanobind/include/nanobind/stl/detail/nb_optional.h
Proceed (Y/n)? n
The above command
conda list nanobind
tells me I have installed version 2.2, yet when I write
pip uninstall nanobind
it asks me if I want to uninstall ver. 2.1. (I said no.)
Any help is appreciated. My apologies for being so dense.
Processing /home/dannyb/multiphenicsx
ERROR: Some build dependencies for file:///home/dannyb/multiphenicsx are missing: 'nanobind >= 2.1.0', 'scikit-build-core[pyproject]'.
This is precisely what happened in the original environment. There must be something wrong with the command chain that I am using.
and I get no errors. I’ll try to update the website in the next few days with these details, since it seems to be a common problem. Maybe I’ll add jupyterlab as well in the dependencies.
That’s correct. You are in the same situation as yesterday. But now do the right thing: install those two missing packages using conda rather than using pip!
I am prepared to bet that since you only installed gcc (the C compiler) but not gxx (the C++ compiler), your installation of multiphenicsx used the system wide compiler (provided by ubuntu) which may possibly be different from the one used by conda. nanobind is very picky in that respect, and any mismatch (library version, compiler version) may result in the error that you both are seeing.
While installing, I kept adding things to the conda install list but at some point thought the process was never ending and went for the build-essential package from Ubuntu. It helped but not in a way it should.
To sum up, here is how it should hopefully work for users operating out of a WSL environment:
Hi, I encountered the same issue, and this worked for me on my Windows laptop with WSL. However, now I’m trying to install multiphenicsx in the same way, but I ran into a new issue on macOS:
Building wheels for collected packages: multiphenicsx, viskex
Building wheel for multiphenicsx (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for multiphenicsx (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [51 lines of output]
*** scikit-build-core 0.10.7 using CMake 3.28.3 (wheel)
*** Configuring CMake...
2025-01-27 17:04:43,875 - scikit_build_core - WARNING - Unsupported CMAKE_ARGS ignored: -DCMAKE_BUILD_TYPE=Release
2025-01-27 17:04:49,662 - scikit_build_core - WARNING - Unsupported CMAKE_ARGS ignored: -DCMAKE_BUILD_TYPE=Release
loading initial cache file /var/folders/cd/x63sv1sd6b5fgz5j1fz4pp300000gp/T/tmpb3f8loyr/build/CMakeInit.txt
-- The C compiler identification is Clang 18.1.8
-- The CXX compiler identification is Clang 18.1.8
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/saragazzoni/anaconda3/envs/multiphenicsx/bin/x86_64-apple-darwin13.4.0-clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /Users/saragazzoni/anaconda3/envs/multiphenicsx/bin/clang++
-- Check for working CXX compiler: /Users/saragazzoni/anaconda3/envs/multiphenicsx/bin/clang++ - broken
CMake Error at /Users/saragazzoni/anaconda3/envs/multiphenicsx/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler
"/Users/saragazzoni/anaconda3/envs/multiphenicsx/bin/clang++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/var/folders/cd/x63sv1sd6b5fgz5j1fz4pp300000gp/T/tmpb3f8loyr/build/CMakeFiles/CMakeScratch/TryCompile-wo8J1F'
Run Build Command(s): /Users/saragazzoni/anaconda3/envs/multiphenicsx/bin/ninja -v cmTC_4ff8f
[1/2] /Users/saragazzoni/anaconda3/envs/multiphenicsx/bin/clang++ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -MD -MT CMakeFiles/cmTC_4ff8f.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_4ff8f.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_4ff8f.dir/testCXXCompiler.cxx.o -c /var/folders/cd/x63sv1sd6b5fgz5j1fz4pp300000gp/T/tmpb3f8loyr/build/CMakeFiles/CMakeScratch/TryCompile-wo8J1F/testCXXCompiler.cxx
[2/2] : && /Users/saragazzoni/anaconda3/envs/multiphenicsx/bin/clang++ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/saragazzoni/anaconda3/envs/multiphenicsx/lib -L/Users/saragazzoni/anaconda3/envs/multiphenicsx/lib CMakeFiles/cmTC_4ff8f.dir/testCXXCompiler.cxx.o -o cmTC_4ff8f && :
FAILED: cmTC_4ff8f
: && /Users/saragazzoni/anaconda3/envs/multiphenicsx/bin/clang++ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/saragazzoni/anaconda3/envs/multiphenicsx/lib -L/Users/saragazzoni/anaconda3/envs/multiphenicsx/lib CMakeFiles/cmTC_4ff8f.dir/testCXXCompiler.cxx.o -o cmTC_4ff8f && :
dyld[4740]: Symbol not found: __ZNK4tapi2v119LinkerInterfaceFile28getPlatformsAndMinDeploymentEv
Referenced from: <9F0E4558-C058-3205-A28C-32E28755B708> /Library/Developer/CommandLineTools/usr/bin/ld
Expected in: <9918D37F-F19F-30B9-B311-13829B79C3B0> /Users/saragazzoni/anaconda3/envs/multiphenicsx/lib/libtapi.dylib
clang++: error: unable to execute command: Abort trap: 6
clang++: error: linker command failed due to signal (use -v to see invocation)
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
-- Configuring incomplete, errors occurred!
*** CMake configuration failed
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for multiphenicsx