Dear Experts,
After i build the latest paraview with python 3.7.3, when i open “Python Shell” window it pop error message:
"
Error: Could not import vtkCommonComputationalGeometry
.....
bin/Lib/site-packages\vtkmodules\vtkCommonCore.py", line 2, in <module>
from .vtkCommonCorePython import *
ModuleNotFoundError: No module named 'vtkmodules.vtkCommonCorePython'
"
I can find a file vtkCommonCorePython.pyd under the same directory with vtkCommonCore.py, but dont know how to solve this issue, seems it make python cannot work.
Another issues is about build debug version, my first try found one project need python37_d.lib, However after i install python37_d.lib, all projects link to python37_d.lib, but some project still require to link to python37_d.lib, like building project “WrappingPythonCore”, it said "LINK : fatal error LNK1104: cannot open file 'python37.lib' ", this really make me confused...
Could you please help me out?
Thanks and Best Regards,
Sharon
This issue is caused because i take paraview as a sub directory in my project
When I build paraview alone with python, there is no such issue, can it works OK
Building with visual studio is not tested.
Ninja is much faster anyway.
Nothing prevent you from working in visual studio and building with ninja though.
I do not use nor know much about visual studio, so I can’t answer your questions.
It’s not actively tested due to its slow speed, but it should work.
Another issues is about build debug version, my first try found one project need python37_d.lib, However after i install python37_d.lib, all projects link to python37_d.lib, but some project still require to link to python37_d.lib, like building project “WrappingPythonCore”, it said "LINK : fatal error LNK1104: cannot open file 'python37.lib' ", this really make me confused...
Building VTK in Debug mode and using Debug Python are two different things. What are you trying to do?
After i build the latest paraview with python 3.7.3, when i open “Python Shell” window it pop error message:
Python’s errors are really bad here. It found it, but failed to load it, usually because its dependencies (the other VTK libraries) are not in $PATH.
Then things are probably OK on the Python side. The loading is likely failing due to DLL load errors. Does it work if you add /path/to/paraview/.dll/files to the PATH environment variable?
Hi Ben,
I found if i build paraview alone, it is OK.
However in my situation, paraview is a sub-directory, i wrote a cmake file to add paraview folder when build.
This caused this error, but i dont know how to solve this issue…
Oh, you do add_subdirectory(ParaView)? I’d recommend building ParaView on its own and then doing find_package(ParaView) to build against it. ParaView’s CMake code probably has numerous places where it assumes that it is the top-level project being built.
Hi Ben,
Yes, I do 'add_subdirectory(ParaView)`, all the DLLs are builded correctly, only python is wrong
You are right, seems build paraview alone with python, there is no such issue.
This is caused by taking paraview as a sub directory.
Thank you for your suggestion, in fact i prefer to build paraview and my plugins together, however, if I cannot solve this issue, I may have to take your suggestion to first build paraview, then use find_package…
Thank you for your kind help!
Best Regards,
Sharon
This issue is caused because i take paraview as a sub directory in my project
When I build paraview alone with python, there is no such issue, can it works OK
Thank you for your suggestion, in fact i prefer to build paraview and my plugins together, however, if I cannot solve this issue, I may have to take your suggestion to first build paraview, then use find_package…
You can place the plugin under the Plugins/ directory of ParaView and it will be picked up automatically by ParaView. This is more of a one-off solution though. On master, ParaView is now capable of making an SDK on all platforms, so using an installed ParaView is the suggested way to do it today.
The core problem is caused by the required dll files not being in PATH when loading the Python modules. pvpython lives next to them and that just works, but when using an external Python, extra help is required to get them to be found on Windows.
There is plugin documentation here if you need it: https://kitware.github.io/paraview-docs/nightly/cxx/PluginHowto.html It lacks information on prepping them for distribution, but feedback on what information would be useful would help us focus on what parts need improvement.