Re: [Paraview] problem freezing python

2017-04-24 Thread Burlen Loring

Hi Ben,

Right you are, should be : and not ' '. Seems as though the issues are 
all related to recent OS upgrades on our side. I reinstalled Python and 
the build completes without error and I see all the output of the 
freezing process.


One issue I'm still having is that import math fails. Other modules like 
numpy import it, and as a result fail to import as well. See below. I'm 
hesitant to install with freezing because of this. math seems to be an 
essential module, without which it would be difficult to do any on the 
fly calculations such as camera positioning etc. Do you have any plans 
to fix this?


swowner@cori01:/usr/common/software/ParaView/builds/ParaView-5.3.0> 
./bin/pvpython

Python 2.7.12 (default, Apr 24 2017, 13:19:37)
[GCC 6.3.0 20161221 (Cray Inc.)] on linux2
>>> import math
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named math

On 04/24/2017 06:52 AM, Ben Boeckel wrote:

On Fri, Apr 21, 2017 at 12:10:36 -0700, Burlen Loring wrote:

That file lives in: lib/python2.7/config/config.c.in

OK, it looks like the freeze_paraview.py file can't find it. Could you
debug around line 250 to see what it is actually doing?


-set(ENV{PYTHONPATH} "${PACKAGE_ROOT}")
+set(ENV{PYTHONPATH} "${PACKAGE_ROOT} $ENV{PYTHONPATH}")

I don't see how this is valid (unless breaking the first entry in
`PYTHONPATH` is the goal); it should be separated by a colon.


"/usr/common/software/ParaView/python/2.7.12/lib/python2.7/struct.py",

What Python is this? Where did it come from?


line 1, in 
  from _struct import *
ImportError: No module named _struct

Can you import it in the interpreter living in the above directory?

--Ben


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] problem freezing python

2017-04-24 Thread Ben Boeckel
On Fri, Apr 21, 2017 at 12:10:36 -0700, Burlen Loring wrote:
> That file lives in: lib/python2.7/config/config.c.in

OK, it looks like the freeze_paraview.py file can't find it. Could you
debug around line 250 to see what it is actually doing?

> -set(ENV{PYTHONPATH} "${PACKAGE_ROOT}")
> +set(ENV{PYTHONPATH} "${PACKAGE_ROOT} $ENV{PYTHONPATH}")

I don't see how this is valid (unless breaking the first entry in
`PYTHONPATH` is the goal); it should be separated by a colon.

> "/usr/common/software/ParaView/python/2.7.12/lib/python2.7/struct.py", 

What Python is this? Where did it come from?

> line 1, in 
>  from _struct import *
> ImportError: No module named _struct

Can you import it in the interpreter living in the above directory?

--Ben
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] problem freezing python

2017-04-21 Thread Burlen Loring

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 

import modulefinder
  File 
"/usr/common/software/ParaView/python/2.7.12/lib/python2.7/modulefinder.py", 
line 10, in 

import struct
  File 
"/usr/common/software/ParaView/python/2.7.12/lib/python2.7/struct.py", 
line 1, in 

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

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] problem freezing python

2017-04-21 Thread Ben Boeckel
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
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview