No matching distribution found for vtk error

Question:

I tried to use pip install vtk but I faced an error.

https://i.stack.imgur.com/piSTo.png

"ERROR: Could not find a version that satisfies the requirement vtk (from versions: none)
ERROR: No matching distribution found for vtk"

I tried:

  1. Installing both 32-bit and 64-bit
  2. Installing all versions of python from 3.5 to 3.8
  3. Upgrading pip

and also used Anaconda, I installed it properly but still not working in python and is not identified in cmd by vtk --version.

Help me, please
Thanks

Asked By: Amir Hossein Zeydi

||

Answers:

vtk 8.1.2 was released at Nov 29, 2018. The release provides a number of wheels but not for Python 3.8.

Use Python 3.7 (64-bit required). Or compile from sources.

Answered By: phd

To update this answer VTK now has Python 3.8 support under the 9.0 version has just been released VTK 9.0 download if you download and install the whl from the link provided.

Answered By: g.stevo

Installation on python 3.8 is successful using conda

conda install vtk
Answered By: Allentro

Able to install vtk on python3.8 directly from the source. Follow below commands, it is a bit time taking to build the wheel but would definitely install vtk. Download the version you want to install, in my case i installed the latest 9.1.0 from https://vtk.org/download/

//extract the downloaded file.
mkdir VTK_BUILD
cd VTK_BUILD
cmake -GNinja -DVTK_WHEEL_BUILD=ON -DVTK_WRAP_PYTHON=ON {vtk source path}
ninja
python3 setup.py bdist_wheel

copy path to VTK_BUILD add vtk build paths to the bashrc file to set the path.

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{copied build path}
    export PYTHONPATH=$PYTHONPATH:{copied build path}

This should install vtk.

source link: https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/dev/build.md#building-vtk

Answered By: Gayathri Devi
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.