Build failure due to expander.py
When building on Mac, I get the failure:
[1/440] Checking validity of Tuple.h
FAILED: vtkm/Tuple.h.checked
cd /Users/4nt/vtk-m/build/vtkm && /Applications/CMake.app/Contents/bin/cmake -DPYTHON_EXECUTABLE=/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7 -DPYEXPANDER_COMMAND=/usr/local/bin/expander.py -DSOURCE_FILE=/Users/4nt/vtk-m/vtkm/Tuple.h -DGENERATED_FILE=/Users/4nt/vtk-m/build/vtkm/Tuple.h -P /Users/4nt/vtk-m/CMake/testing/VTKmCheckPyexpander.cmake
Traceback (most recent call last):
File "/usr/local/bin/expander.py", line 13, in <module>
import pyexpander.lib as pyexpander
ModuleNotFoundError: No module named 'pyexpander'
CMake Error at /Users/4nt/vtk-m/CMake/testing/VTKmCheckPyexpander.cmake:48 (message):
Running pyexpander failed (1).
However,
$ pip3 install pyexpander
Requirement already satisfied: pyexpander in /usr/local/lib/python3.7/site-packages (1.10.2)
Note that the Python version is correct. Moreover,
➜ vtkm git:(refactor_integrators) ✗ which expander.py
/usr/local/bin/expander.py
➜ vtkm git:(refactor_integrators) ✗ expander.py Tuple.h.in > Tuple.h
➜ vtkm git:(refactor_integrators) ✗ echo $?
0
It appears the problem is caused by the line -DPYTHON_EXECUTABLE=/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7
; for example I can replicate the problem via
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7 `which expander.py`
Traceback (most recent call last):
File "/usr/local/bin/expander.py", line 13, in <module>
import pyexpander.lib as pyexpander
ModuleNotFoundError: No module named 'pyexpander'
I attempted for fix via adding -DPYTHON_EXECUTABLE=/usr/local/bin/python3
, but no joy:
CMake Warning:
Manually-specified variables were not used by the project:
PYTHON_EXECUTABLE