How to Install VTK (with Python Wrapper) on Red Hat Enterprise Linux (RHEL)
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
add a comment |
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
add a comment |
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
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
rhel compiling rpm cmake
asked Aug 30 '16 at 14:31
Ulad KasachUlad Kasach
15616
15616
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
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
Install latest tarball source code from http://www.vtk.org/download/, e.g.
VTK-7.0.0.tar.gz
Create the following VTK file structure:
mkdir $HOME/VTK
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
- replace
move the contents of
VTK-X.X.X
folder directly into$HOME/VTK/
and remove the folderVTK-X.X.X
Modify your
.bashrc
file
Open .bashrc:
sudo nano ~/.bashrc
- Add
export VTK_ROOT=$HOME/VTK/
to the file - run the command
source $HOME/.bashrc
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...
- The result should be similar to
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.
after install, run:sudo ldconfig
to update ld_library, instead of export LD_LIBRARY_PATH
– Honghe.Wu
Oct 8 '16 at 11:25
add a comment |
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
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
add a comment |
What worked for me building from binary on Centos 7 / RHEL is
Step 1
yum install epel-release
Step 2
yum install vtk
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
Install latest tarball source code from http://www.vtk.org/download/, e.g.
VTK-7.0.0.tar.gz
Create the following VTK file structure:
mkdir $HOME/VTK
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
- replace
move the contents of
VTK-X.X.X
folder directly into$HOME/VTK/
and remove the folderVTK-X.X.X
Modify your
.bashrc
file
Open .bashrc:
sudo nano ~/.bashrc
- Add
export VTK_ROOT=$HOME/VTK/
to the file - run the command
source $HOME/.bashrc
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...
- The result should be similar to
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.
after install, run:sudo ldconfig
to update ld_library, instead of export LD_LIBRARY_PATH
– Honghe.Wu
Oct 8 '16 at 11:25
add a comment |
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
Install latest tarball source code from http://www.vtk.org/download/, e.g.
VTK-7.0.0.tar.gz
Create the following VTK file structure:
mkdir $HOME/VTK
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
- replace
move the contents of
VTK-X.X.X
folder directly into$HOME/VTK/
and remove the folderVTK-X.X.X
Modify your
.bashrc
file
Open .bashrc:
sudo nano ~/.bashrc
- Add
export VTK_ROOT=$HOME/VTK/
to the file - run the command
source $HOME/.bashrc
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...
- The result should be similar to
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.
after install, run:sudo ldconfig
to update ld_library, instead of export LD_LIBRARY_PATH
– Honghe.Wu
Oct 8 '16 at 11:25
add a comment |
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
Install latest tarball source code from http://www.vtk.org/download/, e.g.
VTK-7.0.0.tar.gz
Create the following VTK file structure:
mkdir $HOME/VTK
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
- replace
move the contents of
VTK-X.X.X
folder directly into$HOME/VTK/
and remove the folderVTK-X.X.X
Modify your
.bashrc
file
Open .bashrc:
sudo nano ~/.bashrc
- Add
export VTK_ROOT=$HOME/VTK/
to the file - run the command
source $HOME/.bashrc
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...
- The result should be similar to
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.
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
Install latest tarball source code from http://www.vtk.org/download/, e.g.
VTK-7.0.0.tar.gz
Create the following VTK file structure:
mkdir $HOME/VTK
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
- replace
move the contents of
VTK-X.X.X
folder directly into$HOME/VTK/
and remove the folderVTK-X.X.X
Modify your
.bashrc
file
Open .bashrc:
sudo nano ~/.bashrc
- Add
export VTK_ROOT=$HOME/VTK/
to the file - run the command
source $HOME/.bashrc
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...
- The result should be similar to
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.
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
add a comment |
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
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
What worked for me building from binary on Centos 7 / RHEL is
Step 1
yum install epel-release
Step 2
yum install vtk
add a comment |
What worked for me building from binary on Centos 7 / RHEL is
Step 1
yum install epel-release
Step 2
yum install vtk
add a comment |
What worked for me building from binary on Centos 7 / RHEL is
Step 1
yum install epel-release
Step 2
yum install vtk
What worked for me building from binary on Centos 7 / RHEL is
Step 1
yum install epel-release
Step 2
yum install vtk
answered Feb 5 at 11:35
Mian Asbat AhmadMian Asbat Ahmad
1044
1044
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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