Setting up VTK, with python3.8 and Ubuntu 20.04

前端 未结 2 848
说谎
说谎 2021-01-15 14:31

I recently updated my system to Ubunutu 20.04, and my python is now 3.8. Since then all my import vtk lines don\'t work,



        
相关标签:
2条回答
  • 2021-01-15 14:50

    I was having your same problem: I have built VTK from Kitware but then I got error importing vtk in python. I fixed adding vtk in $PYTHONPATH, you should find it under VTK/build/lib . Everything works fine for me now!

    EDIT: I found also that on the Kitware site the wheels for python3.8 are available, then: pip3 install https://www.vtk.org/files/release/9.0/vtk-9.0.0-cp38-cp38-linux_x86_64.whl should work as well

    0 讨论(0)
  • 2021-01-15 15:02

    Use apt-get install python3-vtk7 (https://packages.ubuntu.com/focal/python3-vtk7) for ubuntu 20.04.

    The python-vtk package is only available for ubuntu 16.04 (https://packages.ubuntu.com/xenial/python-vtk).

    There are no vtk pip wheels for python 3.8, though they do exist for older versions of python. See https://pypi.org/project/vtk/#files

    0 讨论(0)
提交回复
热议问题