[sword-devel] Sword bindings with python 3

Ben cricketc at gmail.com
Thu Jan 9 17:35:50 MST 2014


I decided to try using the Sword bindings with python 3 on a system
with both python 2 & 3, and here's what I did to make it work:

1. made the following change to python/CMakeLists.txt:
-FIND_PACKAGE(PythonInterp REQUIRED)
-FIND_PACKAGE(PythonLibs)
+FIND_PACKAGE(PythonInterp 3 REQUIRED)
+FIND_PACKAGE(PythonLibs 3)

2. use the latest cmake (2.8.12.1)

3. ran the sword install process with a python 3 virtual env
activated; then ran python 3 and was able to use the Sword module

Not sure how easy it would be to pass in the desired python version as
a cmake parameter.

-Ben



More information about the sword-devel mailing list