can not open vtkpython and import vtk

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

can not open vtkpython and import vtk

Franks
Hi list:

I meet some problems in VTK-8.2.0.rc2 with python3.7 in linux(manjaro). When I build the vtk, I set vtkWrapperPython true and specify the version of the python is 3.7. I install the vtk in default path(/usr/local). So its bin and lib path has already been added in environmental variable. I have the following problem.

1. can not open vtkpython
/usr/local/lib64
▶ vtkpython
vtkpython: error while loading shared libraries: libvtkWrappingPython37Core-8.2.so.1: cannot open shared object file: No such file or directory
But thelibvtkWrappingPython37Core-8.2.so.1 is in /usr/local/lib64, and /usr/local/lib64 has already been added in environmental variable.

2. can not import vtk

I add site-packages in PYTHONPATH.
#set vtk
PYTHONPATH=$PYTHONPATH:/usr/local/lib64/python3.7/site-packages/
export PYTHONPATH
But the console still report an error
/usr/local/lib64                                                                                                                                      
▶ python3
Python 3.7.1 (default, Oct 22 2018, 10:41:28)
[GCC 8.2.1 20180831] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
Traceback (most recent call last):
  File "/usr/local/lib64/python3.7/site-packages/vtkmodules/vtkCommonCore.py", line 5, in <module>
    from .vtkCommonCorePython import *
ImportError: libvtkCommonCorePython37D-8.2.so.1: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib64/python3.7/site-packages/vtk.py", line 32, in <module>
    all_spec.loader.exec_module(all_m)
  File "/usr/local/lib64/python3.7/site-packages/vtkmodules/all.py", line 7, in <module>
    from .vtkCommonCore import *
  File "/usr/local/lib64/python3.7/site-packages/vtkmodules/vtkCommonCore.py", line 9, in <module>
    from vtkCommonCorePython import *
ImportError: libvtkCommonCorePython37D-8.2.so.1: cannot open shared object file: No such file or directory
>>>

I am looking forward to your help.

Sent from the VTK - Users mailing list archive at Nabble.com.

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

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

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers