[Paraview] Dose pvpython work with python 3.x ?

Ji Zhang gotofd at gmail.com
Mon Nov 21 10:53:06 EST 2016


Dear Cory,

Thanks very much for your reply.

I have tried what you said, however, I got some error report,
*[  2%] Compiling Python package 'twisted'*
*Listing
'/home/zhangji/PycharmProjects/ParaView-v5.2.0/build/lib/site-packages/vtk/web'...*
*Compiling
'/home/zhangji/PycharmProjects/ParaView-v5.2.0/build/lib/site-packages/vtk/web/dataset_builder.py'...*
****   File
"/home/zhangji/PycharmProjects/ParaView-v5.2.0/build/lib/site-packages/vtk/web/dataset_builder.py",
line 267*
*    print 'Compress', root*
*                   ^*
*SyntaxError: Missing parentheses in call to 'print'*

*Compiling
'/home/zhangji/PycharmProjects/ParaView-v5.2.0/build/lib/site-packages/vtk/web/launcher.py'...*
****   File
"/home/zhangji/PycharmProjects/ParaView-v5.2.0/build/lib/site-packages/vtk/web/launcher.py",
line 155*
*    print "ERROR: %s is missing %s key." % (object_name, key)*
*                                       ^*
*SyntaxError: invalid syntax*

It looks like that python 2 have been used when I make the code.

The configure commands I used associated with python are showing below, I
think I told the compiler use a python 3 environment.
[image: Inline image 1]

Thanks.


此致
    敬礼
张骥(博士研究生)
北京计算科学研究中心
北京市海淀区西北旺东路10号院东区9号楼 (100193)

Best,
Regards,
Zhang Ji, PhD student
Beijing Computational Science Research Center
Zhongguancun Software Park II, No. 10 Dongbeiwang West Road, Haidian
District, Beijing 100193, China

On Mon, Nov 21, 2016 at 11:15 PM, Cory Quammen <cory.quammen at kitware.com>
wrote:

> Python 3 support should be officially supported in the next release,
> sometime in spring 2017.
>
> You can experimentally build ParaView's development version with
> Python 3 using the following settings (taken from a build on Ubuntu):
>
> PYTHON_EXECUTABLE             /usr/bin/python3
> PYTHON_EXTRA_LIBS
> PYTHON_INCLUDE_DIR            /usr/include/python3.5m
> PYTHON_LIBRARY                /usr/lib/x86_64-linux-gnu/libpython3.5m.so
> PYTHON_UTIL_LIBRARY           /usr/lib/x86_64-linux-gnu/libutil.so
> VTK_PYTHON_VERSION                3
>
> ParaViewWeb won't work, because it depends on Twisted server which is
> still python2, so make sure ParaViewWeb is disabled.
>
> You may also need to install on Ubuntu the following:
>
> sudo apt-get install python2-dev python3-dev
>
> python3.5m gets installed by python3 package
>
> Thanks,
> Cory
>
> On Mon, Nov 21, 2016 at 4:25 AM, Ji Zhang <gotofd at gmail.com> wrote:
> > Dear all,
> >
> > I have checked the paraview mail list, as far as I know, pvpython do not
> > work with python 3 until last year. However, a year past, dose it work
> with
> > python 3 now?
> >
> > The document said it works,
> > ParaView is working towards full Python 3 support. To that end, python
> code
> > should be written so it is compatible with Python 2.7 and Python 3.5. See
> > http://www.paraview.org/ParaView3/Doc/Nightly/www/py-
> doc/python-2-vs-3.html
> >
> > If it works, what should I do to use it?
> >
> > Thanks.
> >
> > 此致
> >     敬礼
> > 张骥(博士研究生)
> > 北京计算科学研究中心
> > 北京市海淀区西北旺东路10号院东区9号楼 (100193)
> >
> > Best,
> > Regards,
> > Zhang Ji, PhD student
> > Beijing Computational Science Research Center
> > Zhongguancun Software Park II, No. 10 Dongbeiwang West Road, Haidian
> > District, Beijing 100193, China
> >
> > _______________________________________________
> > 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 ParaView Wiki at:
> > http://paraview.org/Wiki/ParaView
> >
> > Search the list archives at: http://markmail.org/search/?q=ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/paraview
> >
>
>
>
> --
> Cory Quammen
> Staff R&D Engineer
> Kitware, Inc.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20161121/68d0f0a7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 238078 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20161121/68d0f0a7/attachment-0001.png>


More information about the ParaView mailing list