Skip to content

Commit fd9496e

Browse files
authored
Merge pull request #39 from jviereck/patch-2
Add note for compiling eigenpy with python3 on macOS
2 parents 5f61bdc + 636ffc4 commit fd9496e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,23 @@ directory:
2323
Please note that CMake produces a `CMakeCache.txt` file which should
2424
be deleted to reconfigure a package from scratch.
2525

26+
#### Compiling for python3 on macOS
27+
28+
Make sure you have boost for python3 installed. If you use homebrew, you can install it via `brew install boost-python3`.
29+
30+
Assuming you have python2 and python3 installed on your system, you can compile for python3 using
31+
32+
```
33+
cmake -DPYTHON_EXECUTABLE=`which python3` ..
34+
```
35+
36+
In case you get an error as only the libraries for python2 are found, make sure macOS can find the python3 libraries. One way to ensure this is by adding a symbolic link to the python3 libraries like
37+
38+
```
39+
ln -s /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib /usr/loca/lib/libpython3.7.dylib
40+
```
41+
42+
where the abolve file source path was determined by looking at the output of `brew ls --verbose python3 | grep libpython3`.
2643

2744
### Dependencies
2845

0 commit comments

Comments
 (0)