[Paraview] problem freezing python

Burlen Loring bloring at lbl.gov
Fri Apr 21 15:10:36 EDT 2017


On 04/21/2017 10:19 AM, Ben Boeckel wrote:
> On Thu, Apr 20, 2017 at 14:44:47 -0700, Burlen Loring wrote:
>> [100%] Freezing Python and ParaView Python packages and modules
>> Removing
>> /usr/common/software/ParaView/builds/ParaView-5.3.0/Utilities/PythonInitializer/FrozenPython
>> Error: could not find python lib directory
>> Use
>> ``/usr/common/software/ParaView/builds/ParaView/ThirdParty/FreezePython/freeze/freeze_paraview.py
>> -h'' for help
>> CMake Error at
>> /usr/common/software/ParaView/builds/ParaView/ThirdParty/FreezePython/vtkFreezePython.cmake:64
>> (message):
>>     freeze_paraview failed (2)
> Looking at the code, it seems that there is not a `config.c.in` in your
> `lib/python2.x` directory. It seems that it only searches `lib`. Are you
> on a platform which uses `/usr/lib64`, `/usr/lib/x86_64-linux-gnu`, or
> similar? Can you find a `config.c.in` near your Python installation?
>
> --Ben
That file lives in: lib/python2.7/config/config.c.in

On this system Python (and all software) is installed on a high 
performance file system that is mounted read only on the compute system. 
We have to set certain environment vars to get Python to run from this 
location, but PV's cmake code overwrites at least one of them.

I made the following change

diff --git a/ThirdParty/FreezePython/vtkFreezePython.cmake 
b/ThirdParty/FreezePython/vtkFreezePython.cmake
index a94a5d7..405f87b 100644
--- a/ThirdParty/FreezePython/vtkFreezePython.cmake
+++ b/ThirdParty/FreezePython/vtkFreezePython.cmake
@@ -33,7 +33,7 @@ endif()
  message("Removing ${OUTPUT_DIRECTORY}")
  file(REMOVE_RECURSE "${OUTPUT_DIRECTORY}")
  file(MAKE_DIRECTORY "${OUTPUT_DIRECTORY}")
-set(ENV{PYTHONPATH} "${PACKAGE_ROOT}")
+set(ENV{PYTHONPATH} "${PACKAGE_ROOT} $ENV{PYTHONPATH}")
  execute_process(
      COMMAND ${PYTHON_EXECUTABLE}
"${CMAKE_CURRENT_LIST_DIR}/freeze/freeze_paraview.py"
lines 1-13/13 (END)

the change got me further but still there are some issues

[100%] Freezing Python and ParaView Python packages and modules
Removing 
/usr/common/software/ParaView/builds/ParaView-5.3.0/Utilities/PythonInitializer/FrozenPython
Traceback (most recent call last):
   File 
"/usr/common/software/ParaView/builds/ParaView/ThirdParty/FreezePython/freeze/freeze_paraview.py", 
line 100, in <module>
     import modulefinder
   File 
"/usr/common/software/ParaView/python/2.7.12/lib/python2.7/modulefinder.py", 
line 10, in <module>
     import struct
   File 
"/usr/common/software/ParaView/python/2.7.12/lib/python2.7/struct.py", 
line 1, in <module>
     from _struct import *
ImportError: No module named _struct
CMake Error at 
/usr/common/software/ParaView/builds/ParaView/ThirdParty/FreezePython/vtkFreezePython.cmake:64 
(message):
   freeze_paraview failed (1)


Utilities/PythonInitializer/CMakeFiles/vtkUtilitiesPythonInitializer.dir/build.make:61: 
recipe for target 
'Utilities/PythonInitializer/FrozenPython/vtkFrozenParaViewPython.h' failed
make[2]: *** 
[Utilities/PythonInitializer/FrozenPython/vtkFrozenParaViewPython.h] Error 1
CMakeFiles/Makefile2:51795: recipe for target 
'Utilities/PythonInitializer/CMakeFiles/vtkUtilitiesPythonInitializer.dir/all' 
failed
make[1]: *** 
[Utilities/PythonInitializer/CMakeFiles/vtkUtilitiesPythonInitializer.dir/all] 
Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2



More information about the ParaView mailing list