# Linker error when using pvpython

**URL:** https://discourse.paraview.org/t/linker-error-when-using-pvpython/7297
**Category:** ParaView Support
**Created:** [May 26, 2021, 7:34am UTC](https://discourse.paraview.org/t/linker-error-when-using-pvpython/7297 "2021-05-26T07:34:41Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![mbm](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mbm/32/6766_2.png) [@mbm](https://discourse.paraview.org/u/mbm)
#### Post date: [May 26, 2021, 7:34am UTC](https://discourse.paraview.org/t/linker-error-when-using-pvpython/7297/1 "2021-05-26T07:34:41Z")

</div>

I am trying to use the headless build of paraview 5.9.1 (EGL and Mesa) that I downloaded from the Paraview website (ParaView-5.9.0-egl-MPI-Linux-Python3.8-64bit.tar.gz). I have not found a guide for running this, so I tried just launching pvpython from the bin folder after uncompressed.

When I try to import anything from the paraview module, it fails and it is ultimately because it is trying to load vtk libraries like:  
`libvtkWrappingPythonCore-9.0.so.1`  
whereas the vtk module libraries in the lib folder are in the format:  
`libvtkWrappingPythonCore3.8-pv5.9.so.1`

I have an install of VTK elsewhere that I have compiled and I tried using LD\_LIBRARY\_PATH to use those libs, but that just caused a bunch of segfaults when I import paraview. My assumption is that pvpython should be loading the dynamic libraries in that lib folder but for some reason it is looking for the wrong library conventions. I have tried completely unsetting my environment before running pvpython, but this did not help. I also tried 5.9.0 in case there was a bug in that build.

I am on Ubuntu 20.04.2.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 26, 2021, 9:28am UTC](https://discourse.paraview.org/t/linker-error-when-using-pvpython/7297/2 "2021-05-26T09:28:27Z")

</div>

```
[glow@arch ~/work/paraview/others]$ cd ParaView-5.9.1-osmesa-MPI-Linux-Python3.8-64bit/
[glow@arch ~/work/paraview/others/ParaView-5.9.1-osmesa-MPI-Linux-Python3.8-64bit]$ ./bin/pvpython
Python 3.8.8 (default, May 17 2021, 15:56:25) 
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from paraview.simple import *
>>> exit()

```

works perfectly here. Make sure your archive is complete.

---

<div class="post-metadata">

### Author: ![mbm](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mbm/32/6766_2.png) [@mbm](https://discourse.paraview.org/u/mbm)
#### Post date: [May 26, 2021, 10:21am UTC](https://discourse.paraview.org/t/linker-error-when-using-pvpython/7297/3 "2021-05-26T10:21:43Z")

</div>

Interesting - it seems to be because I had a VTK whl installed. I just noticed:

> > > import vtkmodules.vtkCommonCore  
> > > Traceback (most recent call last):  
> > > File “/home/mbm/.local/lib/python3.8/site-packages/vtkmodules/ **init**.py”, line 13, in   
> > > from . import vtkCommonCore  
> > > ImportError: libvtkWrappingPythonCore-9.0.so.1: cannot open shared object file: No such file or directory

As soon as I executed a pip3 uninstall vtk, then it imported paraview just fine.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 26, 2021, 10:23am UTC](https://discourse.paraview.org/t/linker-error-when-using-pvpython/7297/4 "2021-05-26T10:23:59Z")

</div>

@ben.boeckel : Looks like an issue ? ParaView should uses its own libs if available, should it not ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [May 26, 2021, 2:36pm UTC](https://discourse.paraview.org/t/linker-error-when-using-pvpython/7297/5 "2021-05-26T14:36:28Z")

</div>

> [@mbm](#):
>
> I have an install of VTK elsewhere that I have compiled and I tried using LD\_LIBRARY\_PATH to use those libs

This is not supported. ParaView uses its own build of VTK and using/replacing it with an external build is not supported at all. VTK names the libraries with its version numbers, ParaView uses its version number (with the `pv` prefix).

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 26, 2021, 2:38pm UTC](https://discourse.paraview.org/t/linker-error-when-using-pvpython/7297/6 "2021-05-26T14:38:39Z")

</div>

This was a wrong idea from OP. In any case paraview should not try to pick up local system libs.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [May 26, 2021, 2:48pm UTC](https://discourse.paraview.org/t/linker-error-when-using-pvpython/7297/7 "2021-05-26T14:48:33Z")

</div>

ParaView isn’t doing anything like that. My guess is that `PYTHONPATH` (or some other Python packaging setup) is causing that VTK’s Python modules to be picked up first.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 26, 2021, 3:02pm UTC](https://discourse.paraview.org/t/linker-error-when-using-pvpython/7297/8 "2021-05-26T15:02:10Z")

</div>

Right, you may want to check your environnement variables @mbm

---

<div class="post-metadata">

### Author: ![mbm](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mbm/32/6766_2.png) [@mbm](https://discourse.paraview.org/u/mbm)
#### Post date: [May 26, 2021, 7:41pm UTC](https://discourse.paraview.org/t/linker-error-when-using-pvpython/7297/9 "2021-05-26T19:41:09Z")

</div>

To be clear, the library path was something I initially tried. The behavior was the same with a completely empty environment. For some reason when my vtk whl was installed, the paraview install tries to load the wrong libraries. I’ll see if I can reproduce in a new container.
