I’m trying to bake Slicer 4.11 from the source and use my system installed Python 3.6. This is my cmake command:
cmake -DCMAKE_INSTALL_PREFIX=/scratch1/yousefi/Slicer-Install/ -DSlicer_USE_SYSTEM_python=ON -DSlicer_USE_SYSTEM_OpenSSL=ON -G Ninja ../Slicer
It just compiles fine until installing step of SimpleITK that shows this error:
[351/362] Performing install step for 'SimpleITK'
-- SimpleITK: Removing 'install' log files
-- SimpleITK: SimpleITK_WORKING_DIR: /scratch1/yousefi/Slicer-SuperBuild-Debug/SimpleITK-build/SimpleITK-build/Wrapping/Python
-- SimpleITK: /bin/python3.6;setup.py;install
-- SimpleITK: Errors detected - See below.
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: '/usr/local/lib64/python3.6/site-packages/test-easy-install-3462044.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib64/python3.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).
CMake Error at /scratch1/yousefi/Slicer/CMake/ExternalProjectForNonCMakeProject.cmake:104 (message):
SimpleITK: install step failed with exit code '1'.
Outputs also captured in
/scratch1/yousefi/Slicer-SuperBuild-Debug/SimpleITK_install_step_output.txt
and
/scratch1/yousefi/Slicer-SuperBuild-Debug/SimpleITK_install_step_error.txt.
Setting env. variable EP_EXECUTE_DISABLE_CAPTURE_OUTPUTS to 1 allows to
disable file capture.
Call Stack (most recent call first):
/scratch1/yousefi/Slicer-SuperBuild-Debug/SimpleITK_install_step.cmake:3 (ExternalProject_Execute)
FAILED: SimpleITK-prefix/src/SimpleITK-stamp/SimpleITK-install
cd /scratch1/yousefi/Slicer-SuperBuild-Debug/SimpleITK-build && /scratch1/yousefi/cmake-3.18.2-Linux-x86_64/bin/cmake -P /scratch1/yousefi/Slicer-SuperBuild-Debug/SimpleITK_install_step.cmake && /scratch1/yousefi/cmake-3.18.2-Linux-x86_64/bin/cmake -E touch /scratch1/yousefi/Slicer-SuperBuild-Debug/SimpleITK-prefix/src/SimpleITK-stamp/SimpleITK-install
ninja: build stopped: subcommand failed.
It seems that it tries to write some files into the /usr/local/lib64/python3.6/site-packages/
which I don’t have the privilege to write. In fact, I’m not an admin in our cluster. Any idea how to fix it?