Windows Nightly build error: pip install of SimpleITK build failing

Between Oct 7 and Oct 8, the installation of SimpleITK from its build tree started to fail.

Notes:

  • The commits introduced between these two dates are likely unrelated.
  • The error can NOT be reproduced by locally running cmake.exe -P D:\D\P\S-0-build\SimpleITK_install_step.cmake
    • Running from the windows terminal with current drive being either C: or D: does not allow to reproduce.
    • Removing the SimpleITK-* directories from D:\D\P\S-0-build\python-install\Lib\site-packages does not allow to reproduce.

The associated error (logged into file SimpleITK_install_step_error.txt) is the copied below.

  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
    ERROR: Command errored out with exit status 1:
     command: 'D:\D\P\S-0-build\python-install\bin\python.exe' -c 'import io, os, sys, setuptools, tokenize sys.argv[0] = '"'"'C:\\Users\\svc-dashboard\\AppData\\Local\\Temp\\pip-req-build-28m_6mgt\\setup.py'"'"' __file__='"'"'C:\\Users\\svc-dashboard\\AppData\\Local\\Temp\\pip-req-build-28m_6mgt\\setup.py'"'"'f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup setup()'"'"')code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"')f.close()exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\svc-dashboard\AppData\Local\Temp\pip-pip-egg-info-r_1drybq'
         cwd: C:\Users\svc-dashboard\AppData\Local\Temp\pip-req-build-28m_6mgt\
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\svc-dashboard\AppData\Local\Temp\pip-req-build-28m_6mgt\setup.py", line 20, in <module>
        doc_files = [to_package_relpath(f) for f in [r'D:/D/P/S-0-build/SimpleITK-build/SimpleITK-build/Wrapping/Python/SimpleITK/docs/LICENSE',r'D:/D/P/S-0-build/SimpleITK-build/SimpleITK-build/Wrapping/Python/SimpleITK/docs/NOTICE',r'D:/D/P/S-0-build/SimpleITK-build/SimpleITK-build/Wrapping/Python/SimpleITK/docs/Readme.md',r'D:/D/P/S-0-build/SimpleITK-build/SimpleITK-build/Wrapping/Python/SimpleITK/docs/ITK-5.3-NOTICE',r'D:/D/P/S-0-build/SimpleITK-build/SimpleITK-build/Wrapping/Python/SimpleITK/docs/ITK-5.3-README.md']]
      File "C:\Users\svc-dashboard\AppData\Local\Temp\pip-req-build-28m_6mgt\setup.py", line 20, in <listcomp>
        doc_files = [to_package_relpath(f) for f in [r'D:/D/P/S-0-build/SimpleITK-build/SimpleITK-build/Wrapping/Python/SimpleITK/docs/LICENSE',r'D:/D/P/S-0-build/SimpleITK-build/SimpleITK-build/Wrapping/Python/SimpleITK/docs/NOTICE',r'D:/D/P/S-0-build/SimpleITK-build/SimpleITK-build/Wrapping/Python/SimpleITK/docs/Readme.md',r'D:/D/P/S-0-build/SimpleITK-build/SimpleITK-build/Wrapping/Python/SimpleITK/docs/ITK-5.3-NOTICE',r'D:/D/P/S-0-build/SimpleITK-build/SimpleITK-build/Wrapping/Python/SimpleITK/docs/ITK-5.3-README.md']]
      File "C:\Users\svc-dashboard\AppData\Local\Temp\pip-req-build-28m_6mgt\setup.py", line 18, in to_package_relpath
        return osp.relpath(filename, osp.join(os.curdir, pkg_name))
      File "D:\D/P/S-0-build/python-install\Lib\ntpath.py", line 703, in relpath
        raise ValueError("path is on mount %r, start on mount %r" % (
    ValueError: path is on mount 'D:', start on mount 'C:'

Related postings:

The SimpleITK issue occurred on some earlier dates as well.
CDash 2022-09-30
CDash 2022-10-03

COMP: Update ITK to post-v5.3rc04 version and SimpleITK to post-v2.2.0 · Slicer/Slicer@4d1c98e · GitHub did include a change to use pip to install SimpleITK rather than using setup.py which was based on corresponding change at Use pip to install SimpleITK · SimpleITK/SimpleITK@3ce91db · GitHub. That would be my best suspicion about why it would’ve started to randomly occur.

This has been happening intermittently for a while, I thought I had sorted it out earlier when I fixed the nightly build not being cleaned correctly.

To follow up, the issue has been identified and can be reproduced. Thanks @jamesobutler and @Sam_Horvath for your comments :pray:

Since the SimpleITK external project depends on:

  • ITK
  • Swig
  • python-setuptools (itself depending on python-ensurepip and python)
  • python

reproducing the issue required to:

  • delete the content of D:\D\P\S-0-build\python-install
  • open the Slicer.sln and right-click build only onto the python, python-ensurepip and python-setuptools projects
  • re-run the command cmake.exe -P D:\D\P\S-0-build\SimpleITK_install_step.cmake

Then, the warning mentioning pip 21.3 is reported and the error is reproduced.

To address the issue, we need to add python-pip as a dependency to the SimpleITK project.

1 Like

The regression should be fixed by https://github.com/Slicer/Slicer/pull/6576

The plan is to integrate the pull request by 10pm ET so that the upcoming round of nightly is completed with the fix.

1 Like

Good catch! Thanks and sorry I didn’t catch that earlier.