weigertlab / spotiflow

Accurate and efficient spot detection for microscopy data
BSD 3-Clause "New" or "Revised" License
46 stars 4 forks source link

Problem building Spotiflow #7

Closed Buglakova closed 4 weeks ago

Buglakova commented 4 weeks ago

Describe the bug I'm trying to install the 3D version of Spotiflow but pip install fails.

To Reproduce I created the environment using the following command:

conda create -n spotiflow -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cuda=11.8 --no-channel-priority

Then in the repo's directory: pip install -e .

It results in the following error:

Obtaining file:///g/kreshuk/buglakova/libraries/spotiflow_3d_dev
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... error
  error: subprocess-exited-with-error

  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      Traceback (most recent call last):
        File "/home/buglakov/miniconda3/envs/spotiflow/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/buglakov/miniconda3/envs/spotiflow/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/buglakov/miniconda3/envs/spotiflow/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-zqlz9pae/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 448, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-zqlz9pae/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-zqlz9pae/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-zqlz9pae/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 5, in <module>
      ModuleNotFoundError: No module named 'numpy.distutils'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Environment

# Name                    Version                   Build  Channel                                                                                                                                          
_libgcc_mutex             0.1                 conda_forge    conda-forge                                                                                                                                    
_openmp_mutex             4.5                       2_gnu    conda-forge                                                                                                                                    
aom                       3.9.0                hac33072_0    conda-forge                                                                                                                                    
blas                      1.0                         mkl                                                                                                                                                   
brotli-python             1.1.0           py312h30efb56_1    conda-forge                                                                                                                                    
bzip2                     1.0.8                hd590300_5    conda-forge                                                                                                                                    
ca-certificates           2024.6.2             hbcca054_0    conda-forge                                                                                                                                    
cairo                     1.18.0               h3faef2a_0    conda-forge                                                                                                                                    
certifi                   2024.2.2           pyhd8ed1ab_0    conda-forge                                                                                                                                    
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge                                                                                                                                    
cuda-cudart               11.8.89                       0    nvidia                                                                                                                                         
cuda-cupti                11.8.87                       0    nvidia                                                                                                                                         
cuda-libraries            11.8.0                        0    nvidia                                                                                                                                         
cuda-nvrtc                11.8.89                       0    nvidia                                                                                                                                         
cuda-nvtx                 11.8.86                       0    nvidia                                                                                                                                         
cuda-runtime              11.8.0                        0    nvidia                                                                                                                                         
cuda-version              12.5                          3    nvidia                                                                                                                                         
dav1d                     1.2.1                hd590300_0    conda-forge                                                                                                                                    
expat                     2.6.2                h59595ed_0    conda-forge                                                                                                                                    
ffmpeg                    7.0.1           gpl_hb399a10_100    conda-forge                                                                                                                                   
filelock                  3.14.0             pyhd8ed1ab_0    conda-forge                                                                                                                                    
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge                                                                                                                                    
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge                                                                                                                                    
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge                                                                                                                                    
font-ttf-ubuntu           0.83                 h77eed37_2    conda-forge                                                                                                                                    
fontconfig                2.14.2               h14ed4e7_0    conda-forge                                                                                                                                    
fonts-conda-ecosystem     1                             0    conda-forge                                                                                                                                    
fonts-conda-forge         1                             0    conda-forge                                                                                                                                    
freetype                  2.12.1               h267a509_2    conda-forge                                                                                                                                    
fribidi                   1.0.10               h36c2ea0_0    conda-forge                                                                                                                                    
gettext                   0.22.5               h59595ed_2    conda-forge                                                                                                                                    
gettext-tools             0.22.5               h59595ed_2    conda-forge                                                                                                                                    
gmp                       6.3.0                h59595ed_1    conda-forge                                                                                                                                    
gmpy2                     2.1.5           py312h1d5cde6_1    conda-forge                                                                                                                                    
gnutls                    3.7.9                hb077bed_0    conda-forge                                                                                                                                    
graphite2                 1.3.14               h295c915_1                                                                                                                                                   
harfbuzz                  8.5.0                hfac3d4d_0    conda-forge                                                                                                                                    
icu                       73.2                 h59595ed_0    conda-forge                                                                                                                                    
idna                      3.7                pyhd8ed1ab_0    conda-forge                                                                                                                                    
intel-openmp              2023.1.0         hdb19cb5_46306                                                                                                                                                   
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge                                                                                                                                    
lame                      3.100             h166bdaf_1003    conda-forge                                                                                                                                    
lcms2                     2.16                 hb7c19ff_0    conda-forge                                                                                                                                    
ld_impl_linux-64          2.40                 hf3520f5_1    conda-forge                                                                                                                                    
lerc                      4.0.0                h27087fc_0    conda-forge                                                                                                                                    
libabseil                 20240116.2      cxx17_h59595ed_0    conda-forge
libasprintf               0.22.5               h661eb56_2    conda-forge
libasprintf-devel         0.22.5               h661eb56_2    conda-forge
libass                    0.17.1               h8fe9dca_1    conda-forge
libblas                   3.9.0           1_h86c2bf4_netlib    conda-forge
libcblas                  3.9.0           5_h92ddd45_netlib    conda-forge
libcublas                 11.11.3.6                     0    nvidia
libcufft                  10.9.0.58                     0    nvidia
libcufile                 1.10.0.4                      0    nvidia
libcurand                 10.3.6.39                     0    nvidia
libcusolver               11.4.1.48                     0    nvidia
libcusparse               11.7.5.86                     0    nvidia
libdeflate                1.20                 hd590300_0    conda-forge
libdrm                    2.4.120              hd590300_0    conda-forge
libexpat                  2.6.2                h59595ed_0    conda-forge
libffi                    3.4.4                h6a678d5_1  
libgcc-ng                 13.2.0               h77fa898_7    conda-forge
libgettextpo              0.22.5               h59595ed_2    conda-forge
libgettextpo-devel        0.22.5               h59595ed_2    conda-forge
libgfortran-ng            13.2.0               h69a702a_7    conda-forge
libgfortran5              13.2.0               hca663fb_7    conda-forge
libglib                   2.80.2               hf974151_0    conda-forge
libgomp                   13.2.0               h77fa898_7    conda-forge
libhwloc                  2.10.0          default_h5622ce7_1001    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libidn2                   2.3.7                hd590300_0    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
liblapack                 3.9.0           5_h92ddd45_netlib    conda-forge
libnpp                    11.8.0.86                     0    nvidia
libnsl                    2.0.1                hd590300_0    conda-forge
libnvjpeg                 11.9.0.86                     0    nvidia
libopenvino               2024.1.0             h2da1b83_7    conda-forge
libopenvino-auto-batch-plugin 2024.1.0             hb045406_7    conda-forge
libopenvino-auto-plugin   2024.1.0             hb045406_7    conda-forge
libopenvino-hetero-plugin 2024.1.0             h5c03a75_7    conda-forge
libopenvino-intel-cpu-plugin 2024.1.0             h2da1b83_7    conda-forge
libopenvino-intel-gpu-plugin 2024.1.0             h2da1b83_7    conda-forge
libopenvino-intel-npu-plugin 2024.1.0             he02047a_7    conda-forge
libopenvino-ir-frontend   2024.1.0             h5c03a75_7    conda-forge
libopenvino-onnx-frontend 2024.1.0             h07e8aee_7    conda-forge
libopenvino-paddle-frontend 2024.1.0             h07e8aee_7    conda-forge
libopenvino-pytorch-frontend 2024.1.0             he02047a_7    conda-forge
libopenvino-tensorflow-frontend 2024.1.0             h39126c6_7    conda-forge
libopenvino-tensorflow-lite-frontend 2024.1.0             he02047a_7    conda-forge
libopus                   1.3.1                h7f98852_1    conda-forge
libpciaccess              0.18                 hd590300_0    conda-forge
libpng                    1.6.43               h2797004_0    conda-forge
libprotobuf               4.25.3               h08a7969_0    conda-forge
libsqlite                 3.45.3               h2797004_0    conda-forge
libstdcxx-ng              13.2.0               hc0a3c3a_7    conda-forge
libtasn1                  4.19.0               h166bdaf_0    conda-forge
libtiff                   4.6.0                h1dd3fc0_3    conda-forge
libunistring              0.9.10               h7f98852_0    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libva                     2.21.0               hd590300_0    conda-forge
libvpx                    1.14.0               h59595ed_0    conda-forge
libwebp-base              1.4.0                hd590300_0    conda-forge
libxcb                    1.15                 h0b41bf4_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libxml2                   2.12.7               hc051c1a_0    conda-forge
libzlib                   1.2.13               h4ab18f5_6    conda-forge
llvm-openmp               15.0.7               h0cdce71_0    conda-forge
markupsafe                2.1.5           py312h98912ed_0    conda-forge
mkl                       2023.1.0         h213fc3f_46344  
mpc                       1.3.1                hfe3b2da_0    conda-forge
mpfr                      4.2.1                h9458935_1    conda-forge
mpmath                    1.3.0              pyhd8ed1ab_0    conda-forge
ncurses                   6.5                  h59595ed_0    conda-forge
nettle                    3.9.1                h7ab15ed_0    conda-forge
networkx                  3.3                pyhd8ed1ab_1    conda-forge
numpy                     1.26.4          py312heda63a1_0    conda-forge
ocl-icd                   2.3.2                hd590300_1    conda-forge
openh264                  2.4.1                h59595ed_0    conda-forge
openjpeg                  2.5.2                h488ebb8_0    conda-forge
openssl                   3.3.0                h4ab18f5_3    conda-forge
p11-kit                   0.24.1               hc5aa10d_0    conda-forge
pcre2                     10.43                hcad00b1_0    conda-forge
pillow                    10.3.0          py312hdcec9eb_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pixman                    0.43.2               h59595ed_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pugixml                   1.14                 h59595ed_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.12.3          hab00c5b_0_cpython    conda-forge
python_abi                3.12                    4_cp312    conda-forge
pytorch                   2.3.0           py3.12_cuda11.8_cudnn8.7.0_0    pytorch
pytorch-cuda              11.8                 h7e8668a_5    pytorch
pytorch-mutex             1.0                        cuda    pytorch
pyyaml                    6.0.1           py312h98912ed_1    conda-forge
readline                  8.2                  h8228510_1    conda-forge
requests                  2.32.3             pyhd8ed1ab_0    conda-forge
setuptools                70.0.0             pyhd8ed1ab_0    conda-forge
snappy                    1.2.0                hdb0a2a9_1    conda-forge
svt-av1                   2.1.0                hac33072_0    conda-forge
sympy                     1.12            pypyh9d50eac_103    conda-forge
tbb                       2021.12.0            h297d8ca_1    conda-forge
tk                        8.6.14               h39e8969_0  
torchvision               0.18.0              py312_cu118    pytorch
typing_extensions         4.12.1             pyha770c72_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
urllib3                   2.2.1              pyhd8ed1ab_0    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
x264                      1!164.3095           h166bdaf_2    conda-forge
x265                      3.5                  h924138e_3    conda-forge
xorg-fixesproto           5.0               h7f98852_1002    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.1.1                hd590300_0    conda-forge
xorg-libsm                1.2.4                h7391055_0    conda-forge
xorg-libx11               1.8.9                h8ee46fc_0    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h0b41bf4_2    conda-forge
xorg-libxfixes            5.0.3             h7f98852_1004    conda-forge
xorg-libxrender           0.9.11               hd590300_0    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h0b41bf4_1003    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.4.6                h5eee18b_1  
yaml                      0.2.5                h7f98852_2    conda-forge
zlib                      1.2.13               h4ab18f5_6    conda-forge
zstd                      1.5.6                ha6fb4c9_0    conda-forge
AlbertDominguez commented 4 weeks ago

Python 3.12 does not support distutils anymore, so the current implementation requires the Python version to be <= 3.11. Creating a fresh env with Python 3.11 and installing spotiflow there should work!