`GraalPy` causes `blosc2` to fail to install for SCT v7.1 installation

Hi there, I have tried to install the sci toolbox but it fails. I am using a linux system on a university server and don’t have sudo access. I am trying to install to a different folder than home (/data/bmol239/Software).

install_sct_log.txt (64.9 KB)

Hi @Ben,

Thanks so much for your question! I’d be happy to help. :slight_smile:

Thankfully, you shouldn’t need sudo access to install SCT, so I think the root problem is something different.


Here is the error message from your install log:

Collecting blosc2==3.7.1 (from -r requirements-freeze.txt (line 10))
  Using cached blosc2-3.7.1.tar.gz (3.8 MB)
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'error'
  error: subprocess-exited-with-error
  
  × installing build dependencies for blosc2 did not run successfully.
  │ exit code: 1
  ╰─> [42 lines of output]
      WARNING: Disabling truststore because platform isn't supported
      Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu
      Collecting scikit-build-core
        Using cached scikit_build_core-0.11.6-py3-none-any.whl.metadata (18 kB)
      Collecting cython>=3
        Using cached cython-3.2.1-py3-none-any.whl.metadata (6.5 kB)
      Collecting numpy>=2.0.0
        Using cached numpy-2.2.6.tar.gz (20.3 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): still running...
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [12 lines of output]
            + /data/bmol239/Software/python/envs/venv_sct/bin/python3.10 /tmp/pip-install-685jwmw5/numpy_57dd22ddd74c4682b8c3de31547661bf/vendored-meson/meson/meson.py setup /tmp/pip-install-685jwmw5/numpy_57dd22ddd74c4682b8c3de31547661bf /tmp/pip-install-685jwmw5/numpy_57dd22ddd74c4682b8c3de31547661bf/.mesonpy-k_vx3g9h -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-685jwmw5/numpy_57dd22ddd74c4682b8c3de31547661bf/.mesonpy-k_vx3g9h/meson-python-native-file.ini
            The Meson build system
            Version: 1.5.2
            Source dir: /tmp/pip-install-685jwmw5/numpy_57dd22ddd74c4682b8c3de31547661bf
            Build dir: /tmp/pip-install-685jwmw5/numpy_57dd22ddd74c4682b8c3de31547661bf/.mesonpy-k_vx3g9h
            Build type: native build
            Project name: NumPy
            Project version: 2.2.6
      
            ../meson.build:1:0: ERROR: Could not invoke sanity test executable: [Errno 13] Permission denied: '/tmp/pip-install-685jwmw5/numpy_57dd22ddd74c4682b8c3de31547661bf/.mesonpy-k_vx3g9h/meson-private/sanitycheckc.exe'.
      
            A full log can be found at /tmp/pip-install-685jwmw5/numpy_57dd22ddd74c4682b8c3de31547661bf/.mesonpy-k_vx3g9h/meson-logs/meson-log.txt
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: metadata-generation-failed
      
      × Encountered error while generating package metadata.
      ╰─> numpy
      
      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed to build 'blosc2' when installing build dependencies for blosc2

I think there is actually a cascade of problems here:

  • blosc2 is being installed from a Python “source distribution” (.tar.gz) instead of the expected “wheel” (.whl).
  • numpy is required to build blosc2, but numpy is being installed from a Python sdist as well.
  • The build for numpy is failing with the permission error.

So, the permission errors stem from the “root problem” of blosc2 being installed via sdist. Normally, on Linux, both blosc2 should be installed via “wheel” (.whl). So, there is something about your system that is causing pip to not be able to find a supported wheel for your system.


When I look more closely at the log, I see mention of graalpy:

The following packages will be SUPERSEDED by a higher-priority channel:

  python               pkgs/main::python-3.10.19-h6fa692b_0 --> conda-forge::python-3.10.8-0_native230_graalpy 

I think that this is the culprit. We have seen graalpy cause several issues for SCT’s installation in the past:

Can you please check your user folder for conda-specific configuration files?

Sometimes these files (e.g. .condarc) can interfere with SCT’s installation if they contain settings to e.g. prioritize graalpy over the normal Python. If you can, please backup and then remove the offending conda files, then try installing SCT again.

Kind regards,
Joshua

Hi Joshua,

Thanks heaps. I removed the .condarc file and SCT has installed successfully.

Best,
Ben

1 Like