# Problems with installing pyprecice on MacOS

**URL:** <https://precice.discourse.group/t/problems-with-installing-pyprecice-on-macos/484>\
**Category:** Installing preCICE\
**Tags:** python\
**Created:** [February 23, 2021, 6:47am UTC](https://precice.discourse.group/t/problems-with-installing-pyprecice-on-macos/484 "2021-02-23T06:47:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Weinhart](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/thomas_weinhart/32/557_2.png) [@Thomas\_Weinhart](https://precice.discourse.group/u/Thomas_Weinhart)\
**Post date:** [February 23, 2021, 6:47am UTC](https://precice.discourse.group/t/problems-with-installing-pyprecice-on-macos/484/1 "2021-02-23T06:47:53Z")

</div>

I am following the precice tutorial, and got an error I cannot resolve:  
When I “import precice” in python, I get the following error:

> ~/Downloads/part1/skeleton/generator$ python3 generator.py  
> Traceback (most recent call last):  
> File “/Users/weinhartt/Downloads/part1/skeleton/generator/generator.py”, line 3, in   
> import precice  
> File “/Users/weinhartt/Library/Python/3.9/lib/python/site-packages/precice/ **init**.py”, line 3, in   
> from cyprecice import Interface, action\_read\_iteration\_checkpoint, action\_write\_iteration\_checkpoint, action\_write\_initial\_data, get\_version\_information  
> ImportError: dlopen(/Users/weinhartt/Library/Python/3.9/lib/python/site-packages/cyprecice.cpython-39-darwin.so, 2): Symbol not found: \_\_ZN5boost15program\_options19options\_description21m\_default\_line\_lengthE  
> Referenced from: /Users/weinhartt/Library/Python/3.9/lib/python/site-packages/cyprecice.cpython-39-darwin.so  
> Expected in: flat namespace  
> in /Users/weinhartt/Library/Python/3.9/lib/python/site-packages/cyprecice.cpython-39-darwin.so

I am using MacOS Big Sur, SDK 11.0, python 3.9. I have used brew to reinstall boost, petsc, openmpi, then I installed precice and pyprecice, without errors or warning, see below.

Any help is appreciated.

> ~$ brew reinstall boost  
> ==\> Downloading [https://homebrew.bintray.com/bottles/boost-1.75.0\_1.big\_sur.bottle.tar.gz](https://homebrew.bintray.com/bottles/boost-1.75.0_1.big_sur.bottle.tar.gz)  
> Already downloaded: /Users/weinhartt/Library/Caches/Homebrew/downloads/f3136c231545902ba78c4f23a11c4c54cb25503b0621f752eaff050864696ad4–boost-1.75.0\_1.big\_sur.bottle.tar.gz  
> ==\> Reinstalling boost  
> ==\> Pouring boost-1.75.0\_1.big\_sur.bottle.tar.gz  
> 🍺 /usr/local/Cellar/boost/1.75.0\_1: 15,058 files, 524.2MB

> ~/Code/precice-2.2.0/build$ cmake . -DPRECICE\_PETScMapping=OFF && make && make install  
> – === CONFIGURATION ===  
> – Library version to build: 2.2.0  
> – Build configuration: Debug  
> – Build shared libraries: OFF  
> – Target system: Darwin-20.3.0  
> – Host system: Darwin-20.3.0  
> – Library architecture:   
> – CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++  
> – CXX compiler flags:   
> – CXX linker: /Library/Developer/CommandLineTools/usr/bin/ld  
> – Install prefix: /usr/local  
> – Source directory: /Users/weinhartt/Code/precice-2.2.0  
> – Binary directory: /Users/weinhartt/Code/precice-2.2.0/build  
> – Configure package generation: ON  
> – Install tests/testfiles: OFF  
> – Additional CTest MPI Flags:
> 
> – === ENABLED FEATURES ===
> 
> - MPICommunication, Enables the MPI communication back-end.
> 
> - PythonActions, Enables the support for user-defined python actions.
> 
> - CBindings, Enables the native C bindings.
> 
> - FortranBindings, Enables the native Fortran bindings.
> 
> – === DISABLED FEATURES ===
> 
> - PETScMapping, Enables the PETSc-powered radial basic function mappings.
> 
> – === DEPENDENCIES ===  
> – Validating Eigen  
> – Validating Prettyprint - success [cached]  
> – Validating LibXml2  
> – Validating Prettyprint - success [cached]  
> – Validating JSON  
> – Validating Prettyprint - success [cached]  
> – Validating Prettyprint  
> – Validating Prettyprint - success [cached]  
> – MPI Version: Open MPI v4.0.5, package: Open MPI brew@BigSur Distribution, ident: 4.0.5, repo rev: v4.0.5, Aug 26, 2020  
> – PETSc support disabled  
> – Validating LibPython  
> – Validating Prettyprint - success [cached]  
> – Validating NumPy  
> – Validating Prettyprint - success [cached]
> 
> – === TARGETS & PACKAGES ===  
> – Including test sources  
> – Compressing manpage: /Users/weinhartt/Code/precice-2.2.0/build/packaging/man1/binprecice.1  
> Debian package generator disabled: Install prefix is not “/usr”  
> – Compressing changelog
> 
> – === TESTS ===  
> – Test precice.acceleration  
> – Test precice.action  
> – Test [precice.com](http://precice.com)  
> – Test precice.com.mpiports - skipped (OpenMPI)  
> – Test precice.cplscheme  
> – Test [precice.io](http://precice.io)  
> – Test precice.m2n  
> – Test precice.m2n.mpiports - skipped (OpenMPI)  
> – Test precice.mapping  
> – Test precice.mapping.petrbf - skipped  
> – Test precice.math  
> – Test precice.mesh  
> – Test precice.partition  
> – Test precice.interface  
> – Test precice.serial  
> – Test precice.parallel  
> – Test precice.query  
> – Test precice.testing  
> – Test precice.utils  
> – Test precice.xml  
> – Test precice.solverdummy.build.cpp  
> – Test precice.solverdummy.build.c  
> – Test precice.solverdummy.build.fortran  
> – Test precice.solverdummy.run.cpp-cpp  
> – Test precice.solverdummy.run.c-c  
> – Test precice.solverdummy.run.fortran-fortran  
> – Test precice.solverdummy.run.cpp-c  
> – Test precice.solverdummy.run.cpp-fortran  
> – Test precice.solverdummy.run.c-fortran  
> – Configuring done  
> – Generating done  
> – Build files have been written to: /Users/weinhartt/Code/precice-2.2.0/build  
> – Found Git: /usr/local/bin/git (found version “2.30.0”)  
> – Revision status: Detection failed  
> [0%] Built target GitRevision  
> [62%] Built target precice  
> [99%] Built target testprecice  
> [100%] Built target binprecice  
> – Found Git: /usr/local/bin/git (found version “2.30.0”)  
> – Revision status: Detection failed  
> [0%] Built target GitRevision  
> [62%] Built target precice  
> [99%] Built target testprecice  
> [100%] Built target binprecice  
> Install the project…  
> – Install configuration: “Debug”  
> – Installing: /usr/local/lib/libprecice.a  
> – Up-to-date: /usr/local/include/precice/SolverInterface.hpp  
> – Up-to-date: /usr/local/include/precice/SolverInterfaceC.h  
> – Up-to-date: /usr/local/include/precice/SolverInterfaceFortran.hpp  
> – Up-to-date: /usr/local/include/precice/SolverInterfaceFASTEST.hpp  
> – Up-to-date: /usr/local/bin/binprecice  
> – Up-to-date: /usr/local/share/precice/examples  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/solverdummies.doxys  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/precice-config.xml  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/README.md  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/cpp  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/cpp/CMakeLists.txt  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/cpp/solverdummy.cpp  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/cpp/README.md  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/cpp/test.cmake  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/fortran  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/fortran/CMakeLists.txt  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/fortran/solverdummy.f90  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/fortran/README.md  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/c  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/c/CMakeLists.txt  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/c/README.md  
> – Up-to-date: /usr/local/share/precice/examples/solverdummies/c/solverdummy.c  
> – Up-to-date: /usr/local/lib/cmake/precice/preciceTargets.cmake  
> – Installing: /usr/local/lib/cmake/precice/preciceTargets-debug.cmake  
> – Up-to-date: /usr/local/lib/cmake/precice/preciceConfig.cmake  
> – Up-to-date: /usr/local/lib/cmake/precice/preciceConfigVersion.cmake  
> – Up-to-date: /usr/local/share/man/man1  
> – Up-to-date: /usr/local/share/man/man1/binprecice.1.gz  
> – Up-to-date: /usr/local/lib/pkgconfig  
> – Up-to-date: /usr/local/lib/pkgconfig/libprecice.pc  
> – Up-to-date: /usr/local/share/doc/libprecice2/copyright  
> – Installing: /usr/local/share/lintian/overrides/libprecice2  
> – Up-to-date: /usr/local/share/doc/libprecice2/changelog.gz

> ~/Code/python-bindings$ pip3 install --user .  
> Processing /Users/weinhartt/Code/python-bindings  
> Installing build dependencies … done  
> Getting requirements to build wheel … done  
> Preparing wheel metadata … done  
> Requirement already satisfied: numpy in /usr/local/lib/python3.9/site-packages (from pyprecice==2.2.0.1+7.g814db22) (1.20.1)  
> Requirement already satisfied: mpi4py in /usr/local/lib/python3.9/site-packages (from pyprecice==2.2.0.1+7.g814db22) (3.0.3)  
> Building wheels for collected packages: pyprecice  
> Building wheel for pyprecice (PEP 517) … done  
> Created wheel for pyprecice: filename=pyprecice-2.2.0.1+7.g814db22-py2.py3-none-any.whl size=5754537 sha256=d5f9312cf520c9de40b227075095167d703b1494456fb3cdf55883f5c3de84bc  
> Stored in directory: /Users/weinhartt/Library/Caches/pip/wheels/a5/25/a8/8ec92057b72c5269060559ab4701d89a98516ef2a129d3c978  
> Successfully built pyprecice  
> Installing collected packages: pyprecice  
> Attempting uninstall: pyprecice  
> Found existing installation: pyprecice 2.2.0.1+7.g814db22  
> Uninstalling pyprecice-2.2.0.1+7.g814db22:  
> Successfully uninstalled pyprecice-2.2.0.1+7.g814db22  
> Successfully installed pyprecice-2.2.0.1+7.g814db22

---

<div class="post-metadata">

**Author:** ![ajaust](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/ajaust/32/160_2.png) [@ajaust](https://precice.discourse.group/u/ajaust)\
**Post date:** [February 23, 2021, 8:06am UTC](https://precice.discourse.group/t/problems-with-installing-pyprecice-on-macos/484/2 "2021-02-23T08:06:12Z")

</div>

Hi!

Have you checked whether building preCICE works as expected? Did you run the tests after installation? Your main problem does not seem to be the Python bindings itself, but it seems to be Boost

```
ImportError: dlopen(/Users/weinhartt/Library/Python/3.9/lib/python/site-packages/cyprecice.cpython-39-darwin.so, 2): Symbol not found: __ZN5boost15program_options19options_description21m_default_line_lengthE

```

I checked the bindings on my machine and they are not linked against Boost, but rather preCICE itself.

As quick workaround I would suggest to install an older version of Boost, e.g., Boost 1.74.0. I guess that is done via

```
brew install boost@1.74.0

```

Then recompile preCICE and the Pythonbindings.

Could you try that and report back?

---

<div class="post-metadata">

**Author:** ![Thomas\_Weinhart](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/thomas_weinhart/32/557_2.png) [@Thomas\_Weinhart](https://precice.discourse.group/u/Thomas_Weinhart)\
**Post date:** [February 23, 2021, 9:53am UTC](https://precice.discourse.group/t/problems-with-installing-pyprecice-on-macos/484/3 "2021-02-23T09:53:01Z")

</div>

Thanks, Alex. Indeed, all tests failed.

The boost problem was that I had an old boost directory in my path (I am now using export PATH=/usr/local/Cellar/boost/1.75.0\_1/include/:${PATH}), so boost was not found.

Some other libraries were not found as well (Eigen and many more), I solved this by adding the cmake option “-DBUILD\_SHARED\_LIBS=ON”.

I still have trouble with the tests using MPI, so I turned off MPI for now: “-DPRECICE\_MPICommunication=OFF -DPRECICE\_PETScMapping=OFF”.

Now the tests compile, and “import precice” works.

---

<div class="post-metadata">

**Author:** ![ajaust](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/ajaust/32/160_2.png) [@ajaust](https://precice.discourse.group/u/ajaust)\
**Post date:** [February 23, 2021, 10:00am UTC](https://precice.discourse.group/t/problems-with-installing-pyprecice-on-macos/484/4 "2021-02-23T10:00:20Z")

</div>

Great to hear that it was so easy to fix. Regarding the MPI issue maybe someone else can comment on that. Did you get any reasonable error message for the failing tests?

---

<div class="post-metadata">

**Author:** ![oguzziya](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/oguzziya/32/155_2.png) [@oguzziya](https://precice.discourse.group/u/oguzziya)\
**Post date:** [February 24, 2021, 9:52am UTC](https://precice.discourse.group/t/problems-with-installing-pyprecice-on-macos/484/5 "2021-02-24T09:52:40Z")

</div>

Hi, in order to have a more detailed look at the failure of the tests, could you run `ctest --output-on-failure` and paste the output here?

---

<div class="post-metadata">

**Author:** ![Thomas\_Weinhart](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/thomas_weinhart/32/557_2.png) [@Thomas\_Weinhart](https://precice.discourse.group/u/Thomas_Weinhart)\
**Post date:** [February 24, 2021, 2:45pm UTC](https://precice.discourse.group/t/problems-with-installing-pyprecice-on-macos/484/6 "2021-02-24T14:45:16Z")

</div>

These are the errors I get when I use the cmake option “-DPRECICE\_MPICommunication=ON”:

> ~/Code/precice/build$ ctest --output-on-failure  
> Test project /Users/weinhartt/Code/precice/build  
> Start 1: precice.acceleration  
> 1/26 Test #1: precice.acceleration …Child killed\*\*\*Exception: 0.15 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 2: precice.action
> 
> ```
> 
> 2/26 Test #2: precice.action …Child killed\*\*\*Exception: 0.11 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 3: precice.com
> 
> ```
> 
> 3/26 Test #3: [precice.com](http://precice.com) …Child killed\*\*\*Exception: 0.11 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 4: precice.cplscheme
> 
> ```
> 
> 4/26 Test #4: precice.cplscheme …Child killed\*\*\*Exception: 0.12 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 5: precice.io
> 
> ```
> 
> 5/26 Test #5: [precice.io](http://precice.io) …Child killed\*\*\*Exception: 0.12 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 6: precice.m2n
> 
> ```
> 
> 6/26 Test #6: precice.m2n …Child killed\*\*\*Exception: 0.11 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 7: precice.mapping
> 
> ```
> 
> 7/26 Test #7: precice.mapping …Child killed\*\*\*Exception: 0.11 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 8: precice.math
> 
> ```
> 
> 8/26 Test #8: precice.math …Child killed\*\*\*Exception: 0.10 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 9: precice.mesh
> 
> ```
> 
> 9/26 Test #9: precice.mesh …Child killed\*\*\*Exception: 0.10 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 10: precice.partition
> 
> ```
> 
> 10/26 Test #10: precice.partition …Child killed\*\*\*Exception: 0.10 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 11: precice.interface
> 
> ```
> 
> 11/26 Test #11: precice.interface …Child killed\*\*\*Exception: 0.11 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 12: precice.serial
> 
> ```
> 
> 12/26 Test #12: precice.serial …Child killed\*\*\*Exception: 0.12 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 13: precice.parallel
> 
> ```
> 
> 13/26 Test #13: precice.parallel …Child killed\*\*\*Exception: 0.11 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 14: precice.query
> 
> ```
> 
> 14/26 Test #14: precice.query …Child killed\*\*\*Exception: 0.12 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 15: precice.testing
> 
> ```
> 
> 15/26 Test #15: precice.testing …Child killed\*\*\*Exception: 0.12 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 16: precice.utils
> 
> ```
> 
> 16/26 Test #16: precice.utils …Child killed\*\*\*Exception: 0.11 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 17: precice.xml
> 
> ```
> 
> 17/26 Test #17: precice.xml …Child killed\*\*\*Exception: 0.11 sec  
> dyld: lazy symbol binding failed: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> dyld: Symbol not found: \_opal\_libevent2022\_event\_base\_loop  
> Referenced from: /opt/openmpi-3.1.5/bin/mpiexec  
> Expected in: flat namespace
> 
> ```
> Start 18: precice.solverdummy.build.cpp
> 
> ```
> 
> 18/26 Test #18: precice.solverdummy.build.cpp … Passed 0.93 sec  
> Start 19: precice.solverdummy.build.c  
> 19/26 Test #19: precice.solverdummy.build.c … Passed 0.29 sec  
> Start 20: precice.solverdummy.build.fortran  
> 20/26 Test #20: precice.solverdummy.build.fortran … Passed 0.43 sec  
> Start 21: precice.solverdummy.run.cpp-cpp  
> 21/26 Test #21: precice.solverdummy.run.cpp-cpp … Passed 0.51 sec  
> Start 22: precice.solverdummy.run.c-c  
> 22/26 Test #22: precice.solverdummy.run.c-c … Passed 0.45 sec  
> Start 23: precice.solverdummy.run.fortran-fortran  
> 23/26 Test #23: precice.solverdummy.run.fortran-fortran … Passed 0.49 sec  
> Start 24: precice.solverdummy.run.cpp-c  
> 24/26 Test #24: precice.solverdummy.run.cpp-c … Passed 0.46 sec  
> Start 25: precice.solverdummy.run.cpp-fortran  
> 25/26 Test #25: precice.solverdummy.run.cpp-fortran … Passed 0.45 sec  
> Start 26: precice.solverdummy.run.c-fortran  
> 26/26 Test #26: precice.solverdummy.run.c-fortran … Passed 0.46 sec
> 
> 35% tests passed, 17 tests failed out of 26
> 
> Label Time Summary:  
> Solverdummy = 4.46 sec\*proc (9 tests)
> 
> Total Test time (real) = 6.42 sec
> 
> The following tests FAILED:  
> 1 - precice.acceleration (Child killed)  
> 2 - precice.action (Child killed)  
> 3 - [precice.com](http://precice.com) (Child killed)  
> 4 - precice.cplscheme (Child killed)  
> 5 - [precice.io](http://precice.io) (Child killed)  
> 6 - precice.m2n (Child killed)  
> 7 - precice.mapping (Child killed)  
> 8 - precice.math (Child killed)  
> 9 - precice.mesh (Child killed)  
> 10 - precice.partition (Child killed)  
> 11 - precice.interface (Child killed)  
> 12 - precice.serial (Child killed)  
> 13 - precice.parallel (Child killed)  
> 14 - precice.query (Child killed)  
> 15 - precice.testing (Child killed)  
> 16 - precice.utils (Child killed)  
> 17 - precice.xml (Child killed)  
> Errors while running CTest

---

<div class="post-metadata">

**Author:** ![oguzziya](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/oguzziya/32/155_2.png) [@oguzziya](https://precice.discourse.group/u/oguzziya)\
**Post date:** [February 25, 2021, 9:28am UTC](https://precice.discourse.group/t/problems-with-installing-pyprecice-on-macos/484/7 "2021-02-25T09:28:18Z")

</div>

I think the problem is that open-mpi links to different version. During tests, it tries to link to 3.1 version while you compile with 4.0.5. If you have installed open-mpi using brew, could you try to extend your library path as:  
`export PATH=/usr/local/Cellar/open-mpi/4.0.5/bin:$PATH`  
`export LD_LIBRARY_PATH=/usr/local/Cellar/open-mpi/4.0.5/lib:$LD_LIBRARY_PATH`  
If you have changed your default install path of brew at some point previously, you might need to change the prefix that I gave.  
If it does not work, it would help us to locate the error more precisely if you compile with:  
`make VERBOSE=1`

---

<div class="post-metadata">

**Author:** ![Thomas\_Weinhart](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/thomas_weinhart/32/557_2.png) [@Thomas\_Weinhart](https://precice.discourse.group/u/Thomas_Weinhart)\
**Post date:** [February 25, 2021, 11:53am UTC](https://precice.discourse.group/t/problems-with-installing-pyprecice-on-macos/484/8 "2021-02-25T11:53:09Z")

</div>

Thank you, @oguzziya, that works. Precise now compiles and passes all tests as long as you use “cmake … -DBUILD\_SHARED\_LIBS=ON” (i.e. MPI and PETSc enabled).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/67d2a5fa6f80e597e2267ff17fa8c1673cd11caa.svg) [@system](https://precice.discourse.group/u/system)\
**Post date:** [February 28, 2021, 11:53am UTC](https://precice.discourse.group/t/problems-with-installing-pyprecice-on-macos/484/9 "2021-02-28T11:53:16Z")

</div>

Closed on February 28, 2021, 11:53am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
