How to Install VTK (with Python Wrapper) on Red Hat Enterprise Linux (RHEL)












1















A program I need to compile is dependent on VTK v5.4+ with Python Wrapper. VTK is not in the standard YUM repo's.



How can I install this dependency?



I am running RHEL 7 under developer subscription.










share|improve this question



























    1















    A program I need to compile is dependent on VTK v5.4+ with Python Wrapper. VTK is not in the standard YUM repo's.



    How can I install this dependency?



    I am running RHEL 7 under developer subscription.










    share|improve this question

























      1












      1








      1








      A program I need to compile is dependent on VTK v5.4+ with Python Wrapper. VTK is not in the standard YUM repo's.



      How can I install this dependency?



      I am running RHEL 7 under developer subscription.










      share|improve this question














      A program I need to compile is dependent on VTK v5.4+ with Python Wrapper. VTK is not in the standard YUM repo's.



      How can I install this dependency?



      I am running RHEL 7 under developer subscription.







      rhel compiling rpm cmake






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 30 '16 at 14:31









      Ulad KasachUlad Kasach

      15616




      15616






















          3 Answers
          3






          active

          oldest

          votes


















          3














          Installing VTK Dependencies




          Ensure gcc and g++ are installed:



          yum install gcc
          yum install gcc-c++


          Ensure cmake is installed:



          yum install cmake


          Ensure OpenGL modules are installed



          yum install mesa-libGL
          yum install mesa-libGL-devel


          (mesa-libGL is an MIT licensed implementation of OpenGL which RHEL uses)



          Ensure X11_Xt_LIB is installed:



          yum install libXt-devel


          Ensure Python Libraries are installed:



          yum install python-devel


          Ensure NumPy is installed



          yum whatprovides numpy  # this will provide a list of package names  
          sudo yum install <package name>


          example : sudo yum install numpy-1.7.1-11.el7.x86_64



          Ensure TCL is installed



          sudo yum install tcl


          Installing VTK (with Python Wrapper)



          Here is the reference that was used for this step




          1. Install latest tarball source code from http://www.vtk.org/download/, e.g. VTK-7.0.0.tar.gz



          2. Create the following VTK file structure:



            mkdir $HOME/VTK



          3. extract the tarball contents into the $HOME/VTK folder:



            tar -xvf ~/Downloads/VTK-X.X.X.tar.gz -C ~/VTK



            • replace X.X.X with your version number

            • make sure ~/Downloads/ contains your tarball



          4. move the contents of VTK-X.X.X folder directly into $HOME/VTK/ and remove the folder VTK-X.X.X



          5. Modify your .bashrc file





            • Open .bashrc:



              sudo nano ~/.bashrc


            • Add export VTK_ROOT=$HOME/VTK/ to the file

            • run the command source $HOME/.bashrc




          6. Build VTK with CMake





            • cd $VTK_ROOT
              mkdir build
              cd build
              cmake ../ -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DVTK_WRAP_PYTHON=ON


              Note: if this command says there is no CMakeLists.txt, then the path '../' does not lead to the folder with the extracted data. Make sure you completed the movement of the files specified in step 4.




            • make -j5


              This will take a while the first time




            • make test


              Tests to make sure everything installed properly, this too takes a while




              • The result should be similar to 99% tests passed, 7 tests failed out of 1448. The fewer failures the better, however.

              • If many of them are failing, it may be because the build folder is not surrounded by the source folders, e.g. Accelerators, Charts, etc...






          Python Wrapper



          Modify your .bashrc file




          • sudo nano ~/.bashrc


          • Add the following lines to the file



            export PYTHONPATH=$VTK_ROOT/build/Wrapping/Python/:$VTK_ROOT/build/bin:$VTK_ROOT/build/lib
            export LD_LIBRARY_PATH=$VTK_ROOT/build/bin:$VTK_ROOT/build/lib:$LD_LIBRARY_PATH



          Test installation to make sure it worked





          • python
            import vtk


            Assuming the import vtk command did not complain to you, you're all set.








          share|improve this answer


























          • after install, run: sudo ldconfig to update ld_library, instead of export LD_LIBRARY_PATH

            – Honghe.Wu
            Oct 8 '16 at 11:25



















          1














          A better alternative to building it from source is to install a repository that includes it. EPEL actually has it.



          Download the latest epel-release*.rpm from http://dl.fedoraproject.org/pub/epel/6/x86_64/



          Install epel-release rpm:



          rpm -Uvh epel-release*.rpm


          Install the VTK package:



          yum install vtk





          share|improve this answer
























          • The main problem with building packages from source is that they are not managed by your system's package manager and eventually may cause conflicts.

            – Julie Pelletier
            Aug 30 '16 at 14:52



















          0














          What worked for me building from binary on Centos 7 / RHEL is



          Step 1



          yum install epel-release


          Step 2



          yum install vtk





          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f306682%2fhow-to-install-vtk-with-python-wrapper-on-red-hat-enterprise-linux-rhel%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            Installing VTK Dependencies




            Ensure gcc and g++ are installed:



            yum install gcc
            yum install gcc-c++


            Ensure cmake is installed:



            yum install cmake


            Ensure OpenGL modules are installed



            yum install mesa-libGL
            yum install mesa-libGL-devel


            (mesa-libGL is an MIT licensed implementation of OpenGL which RHEL uses)



            Ensure X11_Xt_LIB is installed:



            yum install libXt-devel


            Ensure Python Libraries are installed:



            yum install python-devel


            Ensure NumPy is installed



            yum whatprovides numpy  # this will provide a list of package names  
            sudo yum install <package name>


            example : sudo yum install numpy-1.7.1-11.el7.x86_64



            Ensure TCL is installed



            sudo yum install tcl


            Installing VTK (with Python Wrapper)



            Here is the reference that was used for this step




            1. Install latest tarball source code from http://www.vtk.org/download/, e.g. VTK-7.0.0.tar.gz



            2. Create the following VTK file structure:



              mkdir $HOME/VTK



            3. extract the tarball contents into the $HOME/VTK folder:



              tar -xvf ~/Downloads/VTK-X.X.X.tar.gz -C ~/VTK



              • replace X.X.X with your version number

              • make sure ~/Downloads/ contains your tarball



            4. move the contents of VTK-X.X.X folder directly into $HOME/VTK/ and remove the folder VTK-X.X.X



            5. Modify your .bashrc file





              • Open .bashrc:



                sudo nano ~/.bashrc


              • Add export VTK_ROOT=$HOME/VTK/ to the file

              • run the command source $HOME/.bashrc




            6. Build VTK with CMake





              • cd $VTK_ROOT
                mkdir build
                cd build
                cmake ../ -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DVTK_WRAP_PYTHON=ON


                Note: if this command says there is no CMakeLists.txt, then the path '../' does not lead to the folder with the extracted data. Make sure you completed the movement of the files specified in step 4.




              • make -j5


                This will take a while the first time




              • make test


                Tests to make sure everything installed properly, this too takes a while




                • The result should be similar to 99% tests passed, 7 tests failed out of 1448. The fewer failures the better, however.

                • If many of them are failing, it may be because the build folder is not surrounded by the source folders, e.g. Accelerators, Charts, etc...






            Python Wrapper



            Modify your .bashrc file




            • sudo nano ~/.bashrc


            • Add the following lines to the file



              export PYTHONPATH=$VTK_ROOT/build/Wrapping/Python/:$VTK_ROOT/build/bin:$VTK_ROOT/build/lib
              export LD_LIBRARY_PATH=$VTK_ROOT/build/bin:$VTK_ROOT/build/lib:$LD_LIBRARY_PATH



            Test installation to make sure it worked





            • python
              import vtk


              Assuming the import vtk command did not complain to you, you're all set.








            share|improve this answer


























            • after install, run: sudo ldconfig to update ld_library, instead of export LD_LIBRARY_PATH

              – Honghe.Wu
              Oct 8 '16 at 11:25
















            3














            Installing VTK Dependencies




            Ensure gcc and g++ are installed:



            yum install gcc
            yum install gcc-c++


            Ensure cmake is installed:



            yum install cmake


            Ensure OpenGL modules are installed



            yum install mesa-libGL
            yum install mesa-libGL-devel


            (mesa-libGL is an MIT licensed implementation of OpenGL which RHEL uses)



            Ensure X11_Xt_LIB is installed:



            yum install libXt-devel


            Ensure Python Libraries are installed:



            yum install python-devel


            Ensure NumPy is installed



            yum whatprovides numpy  # this will provide a list of package names  
            sudo yum install <package name>


            example : sudo yum install numpy-1.7.1-11.el7.x86_64



            Ensure TCL is installed



            sudo yum install tcl


            Installing VTK (with Python Wrapper)



            Here is the reference that was used for this step




            1. Install latest tarball source code from http://www.vtk.org/download/, e.g. VTK-7.0.0.tar.gz



            2. Create the following VTK file structure:



              mkdir $HOME/VTK



            3. extract the tarball contents into the $HOME/VTK folder:



              tar -xvf ~/Downloads/VTK-X.X.X.tar.gz -C ~/VTK



              • replace X.X.X with your version number

              • make sure ~/Downloads/ contains your tarball



            4. move the contents of VTK-X.X.X folder directly into $HOME/VTK/ and remove the folder VTK-X.X.X



            5. Modify your .bashrc file





              • Open .bashrc:



                sudo nano ~/.bashrc


              • Add export VTK_ROOT=$HOME/VTK/ to the file

              • run the command source $HOME/.bashrc




            6. Build VTK with CMake





              • cd $VTK_ROOT
                mkdir build
                cd build
                cmake ../ -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DVTK_WRAP_PYTHON=ON


                Note: if this command says there is no CMakeLists.txt, then the path '../' does not lead to the folder with the extracted data. Make sure you completed the movement of the files specified in step 4.




              • make -j5


                This will take a while the first time




              • make test


                Tests to make sure everything installed properly, this too takes a while




                • The result should be similar to 99% tests passed, 7 tests failed out of 1448. The fewer failures the better, however.

                • If many of them are failing, it may be because the build folder is not surrounded by the source folders, e.g. Accelerators, Charts, etc...






            Python Wrapper



            Modify your .bashrc file




            • sudo nano ~/.bashrc


            • Add the following lines to the file



              export PYTHONPATH=$VTK_ROOT/build/Wrapping/Python/:$VTK_ROOT/build/bin:$VTK_ROOT/build/lib
              export LD_LIBRARY_PATH=$VTK_ROOT/build/bin:$VTK_ROOT/build/lib:$LD_LIBRARY_PATH



            Test installation to make sure it worked





            • python
              import vtk


              Assuming the import vtk command did not complain to you, you're all set.








            share|improve this answer


























            • after install, run: sudo ldconfig to update ld_library, instead of export LD_LIBRARY_PATH

              – Honghe.Wu
              Oct 8 '16 at 11:25














            3












            3








            3







            Installing VTK Dependencies




            Ensure gcc and g++ are installed:



            yum install gcc
            yum install gcc-c++


            Ensure cmake is installed:



            yum install cmake


            Ensure OpenGL modules are installed



            yum install mesa-libGL
            yum install mesa-libGL-devel


            (mesa-libGL is an MIT licensed implementation of OpenGL which RHEL uses)



            Ensure X11_Xt_LIB is installed:



            yum install libXt-devel


            Ensure Python Libraries are installed:



            yum install python-devel


            Ensure NumPy is installed



            yum whatprovides numpy  # this will provide a list of package names  
            sudo yum install <package name>


            example : sudo yum install numpy-1.7.1-11.el7.x86_64



            Ensure TCL is installed



            sudo yum install tcl


            Installing VTK (with Python Wrapper)



            Here is the reference that was used for this step




            1. Install latest tarball source code from http://www.vtk.org/download/, e.g. VTK-7.0.0.tar.gz



            2. Create the following VTK file structure:



              mkdir $HOME/VTK



            3. extract the tarball contents into the $HOME/VTK folder:



              tar -xvf ~/Downloads/VTK-X.X.X.tar.gz -C ~/VTK



              • replace X.X.X with your version number

              • make sure ~/Downloads/ contains your tarball



            4. move the contents of VTK-X.X.X folder directly into $HOME/VTK/ and remove the folder VTK-X.X.X



            5. Modify your .bashrc file





              • Open .bashrc:



                sudo nano ~/.bashrc


              • Add export VTK_ROOT=$HOME/VTK/ to the file

              • run the command source $HOME/.bashrc




            6. Build VTK with CMake





              • cd $VTK_ROOT
                mkdir build
                cd build
                cmake ../ -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DVTK_WRAP_PYTHON=ON


                Note: if this command says there is no CMakeLists.txt, then the path '../' does not lead to the folder with the extracted data. Make sure you completed the movement of the files specified in step 4.




              • make -j5


                This will take a while the first time




              • make test


                Tests to make sure everything installed properly, this too takes a while




                • The result should be similar to 99% tests passed, 7 tests failed out of 1448. The fewer failures the better, however.

                • If many of them are failing, it may be because the build folder is not surrounded by the source folders, e.g. Accelerators, Charts, etc...






            Python Wrapper



            Modify your .bashrc file




            • sudo nano ~/.bashrc


            • Add the following lines to the file



              export PYTHONPATH=$VTK_ROOT/build/Wrapping/Python/:$VTK_ROOT/build/bin:$VTK_ROOT/build/lib
              export LD_LIBRARY_PATH=$VTK_ROOT/build/bin:$VTK_ROOT/build/lib:$LD_LIBRARY_PATH



            Test installation to make sure it worked





            • python
              import vtk


              Assuming the import vtk command did not complain to you, you're all set.








            share|improve this answer















            Installing VTK Dependencies




            Ensure gcc and g++ are installed:



            yum install gcc
            yum install gcc-c++


            Ensure cmake is installed:



            yum install cmake


            Ensure OpenGL modules are installed



            yum install mesa-libGL
            yum install mesa-libGL-devel


            (mesa-libGL is an MIT licensed implementation of OpenGL which RHEL uses)



            Ensure X11_Xt_LIB is installed:



            yum install libXt-devel


            Ensure Python Libraries are installed:



            yum install python-devel


            Ensure NumPy is installed



            yum whatprovides numpy  # this will provide a list of package names  
            sudo yum install <package name>


            example : sudo yum install numpy-1.7.1-11.el7.x86_64



            Ensure TCL is installed



            sudo yum install tcl


            Installing VTK (with Python Wrapper)



            Here is the reference that was used for this step




            1. Install latest tarball source code from http://www.vtk.org/download/, e.g. VTK-7.0.0.tar.gz



            2. Create the following VTK file structure:



              mkdir $HOME/VTK



            3. extract the tarball contents into the $HOME/VTK folder:



              tar -xvf ~/Downloads/VTK-X.X.X.tar.gz -C ~/VTK



              • replace X.X.X with your version number

              • make sure ~/Downloads/ contains your tarball



            4. move the contents of VTK-X.X.X folder directly into $HOME/VTK/ and remove the folder VTK-X.X.X



            5. Modify your .bashrc file





              • Open .bashrc:



                sudo nano ~/.bashrc


              • Add export VTK_ROOT=$HOME/VTK/ to the file

              • run the command source $HOME/.bashrc




            6. Build VTK with CMake





              • cd $VTK_ROOT
                mkdir build
                cd build
                cmake ../ -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DVTK_WRAP_PYTHON=ON


                Note: if this command says there is no CMakeLists.txt, then the path '../' does not lead to the folder with the extracted data. Make sure you completed the movement of the files specified in step 4.




              • make -j5


                This will take a while the first time




              • make test


                Tests to make sure everything installed properly, this too takes a while




                • The result should be similar to 99% tests passed, 7 tests failed out of 1448. The fewer failures the better, however.

                • If many of them are failing, it may be because the build folder is not surrounded by the source folders, e.g. Accelerators, Charts, etc...






            Python Wrapper



            Modify your .bashrc file




            • sudo nano ~/.bashrc


            • Add the following lines to the file



              export PYTHONPATH=$VTK_ROOT/build/Wrapping/Python/:$VTK_ROOT/build/bin:$VTK_ROOT/build/lib
              export LD_LIBRARY_PATH=$VTK_ROOT/build/bin:$VTK_ROOT/build/lib:$LD_LIBRARY_PATH



            Test installation to make sure it worked





            • python
              import vtk


              Assuming the import vtk command did not complain to you, you're all set.









            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 30 '16 at 15:25









            Toby Speight

            5,32111031




            5,32111031










            answered Aug 30 '16 at 14:31









            Ulad KasachUlad Kasach

            15616




            15616













            • after install, run: sudo ldconfig to update ld_library, instead of export LD_LIBRARY_PATH

              – Honghe.Wu
              Oct 8 '16 at 11:25



















            • after install, run: sudo ldconfig to update ld_library, instead of export LD_LIBRARY_PATH

              – Honghe.Wu
              Oct 8 '16 at 11:25

















            after install, run: sudo ldconfig to update ld_library, instead of export LD_LIBRARY_PATH

            – Honghe.Wu
            Oct 8 '16 at 11:25





            after install, run: sudo ldconfig to update ld_library, instead of export LD_LIBRARY_PATH

            – Honghe.Wu
            Oct 8 '16 at 11:25













            1














            A better alternative to building it from source is to install a repository that includes it. EPEL actually has it.



            Download the latest epel-release*.rpm from http://dl.fedoraproject.org/pub/epel/6/x86_64/



            Install epel-release rpm:



            rpm -Uvh epel-release*.rpm


            Install the VTK package:



            yum install vtk





            share|improve this answer
























            • The main problem with building packages from source is that they are not managed by your system's package manager and eventually may cause conflicts.

              – Julie Pelletier
              Aug 30 '16 at 14:52
















            1














            A better alternative to building it from source is to install a repository that includes it. EPEL actually has it.



            Download the latest epel-release*.rpm from http://dl.fedoraproject.org/pub/epel/6/x86_64/



            Install epel-release rpm:



            rpm -Uvh epel-release*.rpm


            Install the VTK package:



            yum install vtk





            share|improve this answer
























            • The main problem with building packages from source is that they are not managed by your system's package manager and eventually may cause conflicts.

              – Julie Pelletier
              Aug 30 '16 at 14:52














            1












            1








            1







            A better alternative to building it from source is to install a repository that includes it. EPEL actually has it.



            Download the latest epel-release*.rpm from http://dl.fedoraproject.org/pub/epel/6/x86_64/



            Install epel-release rpm:



            rpm -Uvh epel-release*.rpm


            Install the VTK package:



            yum install vtk





            share|improve this answer













            A better alternative to building it from source is to install a repository that includes it. EPEL actually has it.



            Download the latest epel-release*.rpm from http://dl.fedoraproject.org/pub/epel/6/x86_64/



            Install epel-release rpm:



            rpm -Uvh epel-release*.rpm


            Install the VTK package:



            yum install vtk






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 30 '16 at 14:47









            Julie PelletierJulie Pelletier

            6,98011340




            6,98011340













            • The main problem with building packages from source is that they are not managed by your system's package manager and eventually may cause conflicts.

              – Julie Pelletier
              Aug 30 '16 at 14:52



















            • The main problem with building packages from source is that they are not managed by your system's package manager and eventually may cause conflicts.

              – Julie Pelletier
              Aug 30 '16 at 14:52

















            The main problem with building packages from source is that they are not managed by your system's package manager and eventually may cause conflicts.

            – Julie Pelletier
            Aug 30 '16 at 14:52





            The main problem with building packages from source is that they are not managed by your system's package manager and eventually may cause conflicts.

            – Julie Pelletier
            Aug 30 '16 at 14:52











            0














            What worked for me building from binary on Centos 7 / RHEL is



            Step 1



            yum install epel-release


            Step 2



            yum install vtk





            share|improve this answer




























              0














              What worked for me building from binary on Centos 7 / RHEL is



              Step 1



              yum install epel-release


              Step 2



              yum install vtk





              share|improve this answer


























                0












                0








                0







                What worked for me building from binary on Centos 7 / RHEL is



                Step 1



                yum install epel-release


                Step 2



                yum install vtk





                share|improve this answer













                What worked for me building from binary on Centos 7 / RHEL is



                Step 1



                yum install epel-release


                Step 2



                yum install vtk






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 5 at 11:35









                Mian Asbat AhmadMian Asbat Ahmad

                1044




                1044






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f306682%2fhow-to-install-vtk-with-python-wrapper-on-red-hat-enterprise-linux-rhel%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

                    is 'sed' thread safe

                    How to make a Squid Proxy server?