[vtkusers] Manually creating site-packages directory for Python

David Doria daviddoria at gmail.com
Tue May 14 15:56:33 EDT 2013


I built VTK with Python support, and then tried to 'make install' (to
/home/doriad/bin/vtk). I got this error:

-------------------------
running cd "/home/doriad/build/vtk/Wrapping/Python" && /usr/bin/python
setup.py install --prefix="/home/doriad/bin/vtk"  2>&1
running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 2] No such file or directory:
'/home/doriad/bin/vtk/lib/python2.6/site-packages/test-easy-install-13976.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /home/doriad/bin/vtk/lib/python2.6/site-packages/

This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).

-------------------------

After some digging around in the archives, it seems that if I do:

mkdir /home/doriad/bin/vtk/lib/python2.6/
mkdir /home/doriad/bin/vtk/lib/python2.6/site-packages/

and add

export PYTHONPATH=$PYTHONPATH:/home/doriad/bin/vtk/lib/python2.6/site-packages/

to my .bashrc, everything installs properly. Is there a reason that
the VTK 'install' Make target is not able to create this directory and
setup the PYTHONPATH properly in the VTK CMake configuration?

Thanks,

David



More information about the vtkusers mailing list