# vtkXdmfReader not working in Python on Ubuntu

**URL:** https://discourse.vtk.org/t/vtkxdmfreader-not-working-in-python-on-ubuntu/2450
**Category:** Support
**Created:** [January 17, 2020, 4:35pm UTC](https://discourse.vtk.org/t/vtkxdmfreader-not-working-in-python-on-ubuntu/2450 "2020-01-17T16:35:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Patrick\_Mineault](https://discourse.vtk.org/user_avatar/discourse.vtk.org/patrick_mineault/32/1270_2.png) [@Patrick\_Mineault](https://discourse.vtk.org/u/Patrick_Mineault)
#### Post date: [January 17, 2020, 4:35pm UTC](https://discourse.vtk.org/t/vtkxdmfreader-not-working-in-python-on-ubuntu/2450/1 "2020-01-17T16:35:18Z")

</div>

I am trying to use the vtkXdmfReader in Python to read a file. I was able to make this work on Windows with a pre-built Windows version of vtk without a hitch. Now I am trying this on Ubuntu and although vtk and its python bindings seem to install fine, vtkXdmfReader does not seem to install (module ‘vtk’ has no attribute ‘vtkXdmfReader’). Since the goal is to deploy in the cloud, I have a dockerfile that captures my config:

```
FROM ubuntu:18.04

USER root

RUN apt-get update && apt-get install -y python3-pip libgl1-mesa-dev xvfb

RUN useradd -ms /bin/bash mini
WORKDIR /home/mini

USER mini

RUN pip3 install h5py vtk

ENTRYPOINT /bin/bash

```

Now I build and run:

```
$ docker built -it mini .
$ docker run -it mini
mini@cc246a3bcbe8:~$ python3
Python 3.6.9 (default, Nov 7 2019, 10:44:02) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
>>> vtk.vtkXdmfReader
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'vtk' has no attribute 'vtkXdmfReader'

```

However, it seems to be an otherwise fully functioning vtk install, e.g.:

```
>>> [a for a in dir(vtk) if a[:3] == 'vtk'][:25]
['vtk', 'vtk3DSImporter', 'vtk3DWidget', 'vtkAMRBaseParticlesReader', 'vtkAMRBaseReader', 'vtkAMRBox', 'vtkAMRCutPlane', 'vtkAMRDataInternals', 'vtkAMRDataSetCache', 'vtkAMREnzoParticlesReader', 'vtkAMREnzoReader', 'vtkAMRFlashParticlesReader', 'vtkAMRFlashReader', 'vtkAMRGaussianPulseSource', 'vtkAMRInformation', 'vtkAMRInterpolatedVelocityField', 'vtkAMRResampleFilter', 'vtkAMRSliceFilter', 'vtkAMRToMultiBlockFilter', 'vtkAMRUtilities', 'vtkASCIITextCodec', 'vtkAVSucdReader', 'vtkAbstractArray', 'vtkAbstractCellLinks', 'vtkAbstractCellLocator']

```

The wheel pip3 pulls is [https://files.pythonhosted.org/packages/22/f5/30e11e1ad21701e1cd185b046979107930419a74a5602c6b899dc8523fe4/vtk-8.1.2-cp36-cp36m-manylinux1\_x86\_64.whl](https://files.pythonhosted.org/packages/22/f5/30e11e1ad21701e1cd185b046979107930419a74a5602c6b899dc8523fe4/vtk-8.1.2-cp36-cp36m-manylinux1_x86_64.whl). I’ve also tried a conda install with the same end result. What am I missing?

---

<div class="post-metadata">

### Author: ![Patrick\_Mineault](https://discourse.vtk.org/user_avatar/discourse.vtk.org/patrick_mineault/32/1270_2.png) [@Patrick\_Mineault](https://discourse.vtk.org/u/Patrick_Mineault)
#### Post date: [January 19, 2020, 1:16am UTC](https://discourse.vtk.org/t/vtkxdmfreader-not-working-in-python-on-ubuntu/2450/2 "2020-01-19T01:16:27Z")

</div>

I did a fresh reinstall on Windows and found that pip install vtk also did not install vtkXdmfReader properly. However, conda worked fine, with this install plan:

```
package | build
---------------------------|-----------------
conda-4.8.1 | py37_0 2.8 MB
expat-2.2.5 | he025d50_0 83 KB
hdf4-4.2.13 | h712560f_2 1.3 MB
jsoncpp-1.8.4 | h74a9793_0 355 KB
libnetcdf-4.6.1 | h411e497_2 494 KB
vtk-8.2.0 | py37h1e53df8_200 21.9 MB
------------------------------------------------------------
                                       Total: 27.0 MB

```

I will try again with conda on Ubuntu and see if that helps.
