# Library not loaded: @rpath/Python3.framework/Versions/3.9/Python3

**URL:** https://discourse.paraview.org/t/library-not-loaded-rpath-python3-framework-versions-3-9-python3/14013
**Category:** ParaView Support
**Created:** [February 25, 2024, 1:30am UTC](https://discourse.paraview.org/t/library-not-loaded-rpath-python3-framework-versions-3-9-python3/14013 "2024-02-25T01:30:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![zhe](https://discourse.paraview.org/user_avatar/discourse.paraview.org/zhe/32/2196_2.png) [@zhe](https://discourse.paraview.org/u/zhe)
#### Post date: [February 25, 2024, 1:30am UTC](https://discourse.paraview.org/t/library-not-loaded-rpath-python3-framework-versions-3-9-python3/14013/1 "2024-02-25T01:30:47Z")

</div>

Hi, I try to install paraview (tag: v5.12.0-RC3) on Mac.  
The code is ok to build, but I got this error when I execute the executable file:

```auto
$ ./bin/paraview.app/Contents/MacOS/paraview 
dyld[25562]: Library not loaded: @rpath/Python3.framework/Versions/3.9/Python3
  Referenced from: <D4B73448-3BB4-394D-BB95-57534A33E26A> /Users/zw1/Documents/cworkspace/build/paraview/bin/paraview.app/Contents/MacOS/paraview
  Reason: tried: '/Users/zw1/Documents/cworkspace/build/paraview/lib/Python3.framework/Versions/3.9/Python3' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/zw1/Documents/cworkspace/build/paraview/lib/Python3.framework/Versions/3.9/Python3' (no such file), '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/Python3.framework/Versions/3.9/Python3' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/Python3.framework/Versions/3.9/Python3' (no such file), '/Users/zw1/Documents/cworkspace/build/paraview/lib/Python3.framework/Versions/3.9/Python3' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/zw1/Documents/cworkspace/build/paraview/lib/Python3.framework/Versions/3.9/Python3' (no such file), '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/Python3.framework/Versions/3.9/Python3' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/Python3.framework/Versions/3.9/Python3' (no such file)
Abort trap: 6

```

This is the path of my python3

```auto
zw1@MAC132276 3.9$ ls
Headers Python3 Resources _CodeSignature bin include lib share
zw1@MAC132276 3.9$ pwd
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9

```

This is the command to build the paraview

```auto
cmake -GNinja -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=OPENMP -DCMAKE_BUILD_TYPE=Release ../../src/paraview

```

It seems that the paraview could not find the right path of the python3 during the build process, could you provide some help about it?

Thanks!

---

<div class="post-metadata">

### Author: ![zhe](https://discourse.paraview.org/user_avatar/discourse.paraview.org/zhe/32/2196_2.png) [@zhe](https://discourse.paraview.org/u/zhe)
#### Post date: [February 25, 2024, 2:08am UTC](https://discourse.paraview.org/t/library-not-loaded-rpath-python3-framework-versions-3-9-python3/14013/2 "2024-02-25T02:08:23Z")

</div>

I found that the rpath of the executable is

```auto
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib

```

It can work if I reset it to

```auto
-Wl,-rpath,/Applications/Xcode.app/Contents/Developer/Library/Frameworks

```

when compiling the executable file.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [February 26, 2024, 1:45am UTC](https://discourse.paraview.org/t/library-not-loaded-rpath-python3-framework-versions-3-9-python3/14013/3 "2024-02-26T01:45:52Z")

</div>

Yes, rpath management is a distributor/packager thing. We cannot possibly know all possible end-user layouts to set up rpaths properly without external input.
