h3jia / nqe

Neural Quantile Estimation.
Other
2 stars 2 forks source link

Installation issues #2

Open asaoulis opened 3 days ago

asaoulis commented 3 days ago

Hi! Thanks for the code implementation of this interesting work. I've attempted to install the package directly through git repo with pip install -e . with a variety of clean conda environments, on python 3.7 3.8 and 3.9. I have tried this on both a MacOS machine and a linux cluster. I get the same error in all environments during the installation stage.

Obtaining file:///Users/asaoulis/Documents/work/nqe
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'error'
  error: subprocess-exited-with-error

  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [1476 lines of output]
      test_icx.c:3:2: error: This is not the Intel oneAPI compiler
      #error This is not the Intel oneAPI compiler
       ^
      1 error generated.
      clang: error: unsupported option '-fopenmp'
      Cannot compile Cython/C/C++ extension with OpenMP, reverting to non-parallel code
      <string>:21: RuntimeWarning: OpenMP check failed. Compiling without it for now.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...

      # The following cimport statement provides legacy ABI
      # support. Changing it causes an ABI forward-compatibility break
      # (gh-11793), so we currently leave it as is (no further cimport
      # statements should be used in this file).
      from .cython_optimize._zeros cimport (
      ^
      ------------------------------------------------------------

      /private/var/folders/zf/ks2rg74x3x33667ddkkvgkz80000gn/T/pip-build-env-v917t_co/overlay/lib/python3.8/site-packages/scipy/optimize/cython_optimize.pxd:10:0: 'scipy/optimize/cython_optimize/cython_optimize/_zeros.pxd' not found

      Error compiling Cython file:
      ------------------------------------------------------------
      ...

      # The following cimport statement provides legacy ABI
      # support. Changing it causes an ABI forward-compatibility break
      # (gh-11793), so we currently leave it as is (no further cimport
      # statements should be used in this file).
      from .cython_optimize._zeros cimport (
      ^
      ------------------------------------------------------------

      /private/var/folders/zf/ks2rg74x3x33667ddkkvgkz80000gn/T/pip-build-env-v917t_co/overlay/lib/python3.8/site-packages/scipy/optimize/cython_optimize.pxd:10:0: 'scipy/optimize/cython_optimize/cython_optimize/_zeros/brentq.pxd' not found

      Error compiling Cython file:
      ------------------------------------------------------------
      ...

Then followed by a very long list of Cython compilation errors. torch is also missing from the package dependencies list.

Thanks again!

h3jia commented 3 days ago

Can you show me the output of pip list or conda list of your env?

asaoulis commented 11 hours ago

Thanks for the prompt reply. When I run pip install -e . on a clean conda env, the install fails so it's just the basic conda environment. I've then tried installing the latest available versions of your requirements via: pip install torch numpy scipy scikit-learn extension-helpers cython

pip list:

Python 3.8.20
Cython                   3.0.11
extension-helpers        1.2.0
filelock                 3.16.1
fsspec                   2024.10.0
Jinja2                   3.1.4
joblib                   1.4.2
MarkupSafe               2.1.5
mpmath                   1.3.0
networkx                 3.1
numpy                    1.24.4
nvidia-cublas-cu12       12.1.3.1
nvidia-cuda-cupti-cu12   12.1.105
nvidia-cuda-nvrtc-cu12   12.1.105
nvidia-cuda-runtime-cu12 12.1.105
nvidia-cudnn-cu12        9.1.0.70
nvidia-cufft-cu12        11.0.2.54
nvidia-curand-cu12       10.3.2.106
nvidia-cusolver-cu12     11.4.5.107
nvidia-cusparse-cu12     12.1.0.106
nvidia-nccl-cu12         2.20.5
nvidia-nvjitlink-cu12    12.6.85
nvidia-nvtx-cu12         12.1.105
pip                      24.3.1
scikit-learn             1.3.2
scipy                    1.10.1
setuptools               70.3.0
sympy                    1.13.3
threadpoolctl            3.5.0
tomli                    2.2.1
torch                    2.4.1
triton                   3.0.0
typing_extensions        4.12.2
wheel                    0.45.1

I then get the same error as above on my linux cluster. The install works fine on a fresh Google colab, interestingly.