Skip to content

[BUG] antspyx installation error when using Python3.13 (conda) environment #104

@neuronflow

Description

@neuronflow

when I install in a Python 3.13 env I get the following installation error because of antspyx.

Not sure if this is something we could fix easily, or whether we should add some documentation?

Using cached urllib3-2.3.0-py3-none-any.whl (128 kB)
Building wheels for collected packages: antspyx
  Building wheel for antspyx (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [178 lines of output]
      running bdist_wheel
      running build
      running build_py
      running build_ext
      Configuring ITK
      No local ITK installation found... Building ITK now...
      Cloning into 'itksource'...
      Updating files:  85% (13119/15272)
      Updating files:  86% (13134/15272)
      Updating files:  87% (13287/15272)
      Updating files:  88% (13440/15272)
      Updating files:  89% (13593/15272)
      Updating files:  90% (13745/15272)
      Updating files:  91% (13898/15272)
      Updating files:  92% (14051/15272)
      Updating files:  93% (14203/15272)
      Updating files:  94% (14356/15272)
      Updating files:  95% (14509/15272)
      Updating files:  96% (14662/15272)
      Updating files:  97% (14814/15272)
      Updating files:  98% (14967/15272)
      Updating files:  99% (15120/15272)
      Updating files: 100% (15272/15272)
      Updating files: 100% (15272/15272), done.
      Already on 'master'
      Your branch is up to date with 'origin/master'.
      Note: switching to 'ce57f309f4f4142b80367fd89a88f8dac9d6943a'.
      
      You are in 'detached HEAD' state. You can look around, make experimental
      changes and commit them, and you can discard any commits you make in this
      state without impacting any branches by switching back to a branch.
      
      If you want to create a new branch to retain commits you create, you may
      do so (now or later) by using -c with the switch command. Example:
      
        git switch -c <new-branch-name>
      
      Or undo this operation with:
      
        git switch -
      
      Turn off this advice by setting config variable advice.detachedHead to false
      
      HEAD is now at ce57f309f4 STYLE: Remove obsolete `__GNUC__` macro checks for GCC version 4
      ./scripts/configure_ITK.sh: line 48: cmake: command not found
      make: *** No targets specified and no makefile found.  Stop.
      Configuring ANTs core
      Cloning into 'pybind11'...
      Cloning into 'antsrepo'...
      Already on 'master'
      Your branch is up to date with 'origin/master'.
      Already up to date.
      Note: switching to 'dfd9e6664f2fc5f0dbd05c6c23d5e4895e82abee'.
      
      You are in 'detached HEAD' state. You can look around, make experimental
      changes and commit them, and you can discard any commits you make in this
      state without impacting any branches by switching back to a branch.
      
      If you want to create a new branch to retain commits you create, you may
      do so (now or later) by using -c with the switch command. Example:
      
        git switch -c <new-branch-name>
      
      Or undo this operation with:
      
        git switch -
      
      Turn off this advice by setting config variable advice.detachedHead to false
      
      HEAD is now at dfd9e666 BUG: forget EOL
      Configuring ANTsPy library
      Traceback (most recent call last):
        File "/tmp/pip-install-t8rc6bix/antspyx_90a56fa513014e218b44d07328f95ead/setup.py", line 101, in run
          out = subprocess.check_output(["cmake", "--version"])
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/subprocess.py", line 474, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
                 ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     **kwargs).stdout
                     ^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/subprocess.py", line 556, in run
          with Popen(*popenargs, **kwargs) as process:
               ~~~~~^^^^^^^^^^^^^^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/subprocess.py", line 1038, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                              pass_fds, cwd, env,
                              ^^^^^^^^^^^^^^^^^^^
          ...<5 lines>...
                              gid, gids, uid, umask,
                              ^^^^^^^^^^^^^^^^^^^^^^
                              start_new_session, process_group)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/subprocess.py", line 1974, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'cmake'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
          exec(compile('''
          ~~~~^^^^^^^^^^^^
          # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ...<31 lines>...
          exec(compile(setup_py_code, filename, "exec"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ''' % ('/tmp/pip-install-t8rc6bix/antspyx_90a56fa513014e218b44d07328f95ead/setup.py',), "<pip-setuptools-caller>", "exec"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-t8rc6bix/antspyx_90a56fa513014e218b44d07328f95ead/setup.py", line 174, in <module>
          setup(
          ~~~~~^
              name="antspyx",
              ^^^^^^^^^^^^^^^
          ...<41 lines>...
              classifiers=["Programming Language :: Python :: 3.9"],
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          )
          ^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
                 ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 186, in setup
          return run_commands(dist)
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
          dist.run_commands()
          ~~~~~~~~~~~~~~~~~^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 983, in run_commands
          self.run_command(cmd)
          ~~~~~~~~~~~~~~~~^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/dist.py", line 999, in run_command
          super().run_command(command)
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
          cmd_obj.run()
          ~~~~~~~~~~~^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/command/bdist_wheel.py", line 379, in run
          self.run_command("build")
          ~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/_distutils/cmd.py", line 339, in run_command
          self.distribution.run_command(command)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/dist.py", line 999, in run_command
          super().run_command(command)
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
          cmd_obj.run()
          ~~~~~~~~~~~^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/_distutils/command/build.py", line 136, in run
          self.run_command(cmd_name)
          ~~~~~~~~~~~~~~~~^^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/_distutils/cmd.py", line 339, in run_command
          self.distribution.run_command(command)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/dist.py", line 999, in run_command
          super().run_command(command)
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
          cmd_obj.run()
          ~~~~~~~~~~~^^
        File "/tmp/pip-install-t8rc6bix/antspyx_90a56fa513014e218b44d07328f95ead/setup.py", line 39, in run
          self.run_command("build_ext")
          ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/_distutils/cmd.py", line 339, in run_command
          self.distribution.run_command(command)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/dist.py", line 999, in run_command
          super().run_command(command)
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/home/florian/miniconda3/envs/zudepy13/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
          cmd_obj.run()
          ~~~~~~~~~~~^^
        File "/tmp/pip-install-t8rc6bix/antspyx_90a56fa513014e218b44d07328f95ead/setup.py", line 103, in run
          raise RuntimeError(
          ...<2 lines>...
          )
      RuntimeError: CMake must be installed to build the following extensions: ants
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for antspyx
  Running setup.py clean for antspyx
Failed to build antspyx
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (antspyx)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions