[vtkusers] VTK Python3 support

Matthew Brett matthew.brett at gmail.com
Fri Mar 6 16:00:38 EST 2015


Hi,

On Thu, Mar 5, 2015 at 9:21 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> As far as I'm aware, python 3 support hasn't moved forward since the last
> time it came up on the list.  I think that, for too many of us, python is
> python and python2 is available on every machine we use.
>
> Issues:
> 1) VTK wrapping still uses old-style classes.  I've been meaning to fix
> this.
> 2) Basic compile issues and cross-compatibility for py3 and py2 - we
> received a patch that fixes some of these issues.
> 3) Conversion of examples and tests to py3... this is a biggie!  Lots of
> community help required.
>
> Overall, I've just been waiting for py3k to become dominant... but python2
> is still the default python on OS X and on most of the linux systems that I
> use.  My guess is that Kitware is in the same position.  The demand for py3k
> support just doesn't seem to be there yet, even after all these years.

It's true that the default system Python, used for legacy system
scripts, tends to be Python 2.

OSX is typical - in that it's system Python is Python 2.

On the other hand, I suspect that not many scientific Python users are
using OSX system Python - see
https://github.com/MacPython/wiki/wiki/Which-Python .

Linux users can and do install Python 3 with `apt-get install python3'
or similar.

Python 3 will soon be the default on Fedora [1], and packages will be
dropped from the default install if they do not support Python 3 [2].

As others have said, VTK is the last of the big scientific packages
that I know of that does not to have a Python 3 port.  Among those
that do:

numpy
scipy
matplotlib
ipython
cython
scikit-image
scikit-learn
statsmodels
h5py
pandas
pyqt
....

I am teaching Python to scientists these days, and a large and
(obviously) increasing number of tutorials now assume Python 3.

I don't know the relative proportions of 2 and 3 users but this page:

https://sourceforge.net/projects/numpy/files/NumPy/1.9.2/

suggests that, for numpy windows users, the proportion of Python 3
users is about 40%,

Cheers,

Matthew


[1] http://fedoraproject.org/wiki/Changes/Python_3_as_Default
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1014209


More information about the vtkusers mailing list