AMLab-Amsterdam / lie_learn

Computations involving Lie groups and harmonic analysis
MIT License
193 stars 48 forks source link

pip install error #24

Open wzm2256 opened 1 year ago

wzm2256 commented 1 year ago

I use pip install lie_learn and here is the error message: It seems that the longintrepr.h file is not found.

Building wheels for collected packages: lie_learn
  Building wheel for lie_learn (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [101 lines of output]
      /tmp/pip-install-426uqter/lie-learn_cada3dbe4ee348f6bac846d3d3dd79a5/setup.py:19: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.Distribution().fetch_build_eggs(setup_requires_list)
      /home/server/miniconda3/envs/torch20/lib/python3.11/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/lie_learn
      copying lie_learn/broadcasting.py -> build/lib.linux-x86_64-cpython-311/lie_learn
      copying lie_learn/__init__.py -> build/lib.linux-x86_64-cpython-311/lie_learn
      creating build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/SO3FFT_Naive.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/T2FFT.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/S2_conv.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/__init__.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/FFTBase.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/PolarFFT.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/T1FFT.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/SO3_conv.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/SE2FFT.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/S2FFT_NFFT.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/fourier_interpolation.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      copying lie_learn/spectral/S2FFT.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spectral
      creating build/lib.linux-x86_64-cpython-311/lie_learn/representations
      copying lie_learn/representations/__init__.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations
      creating build/lib.linux-x86_64-cpython-311/lie_learn/spaces
      copying lie_learn/spaces/rn.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spaces
      copying lie_learn/spaces/S2.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spaces
      copying lie_learn/spaces/__init__.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spaces
      copying lie_learn/spaces/Tn.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spaces
      copying lie_learn/spaces/S3.py -> build/lib.linux-x86_64-cpython-311/lie_learn/spaces
      creating build/lib.linux-x86_64-cpython-311/lie_learn/groups
      copying lie_learn/groups/__init__.py -> build/lib.linux-x86_64-cpython-311/lie_learn/groups
      copying lie_learn/groups/SO3_tests.py -> build/lib.linux-x86_64-cpython-311/lie_learn/groups
      copying lie_learn/groups/SO2.py -> build/lib.linux-x86_64-cpython-311/lie_learn/groups
      copying lie_learn/groups/SE2.py -> build/lib.linux-x86_64-cpython-311/lie_learn/groups
      creating build/lib.linux-x86_64-cpython-311/lie_learn/probability
      copying lie_learn/probability/S1HarmonicDensity.py -> build/lib.linux-x86_64-cpython-311/lie_learn/probability
      copying lie_learn/probability/HarmonicDensity.py -> build/lib.linux-x86_64-cpython-311/lie_learn/probability
      copying lie_learn/probability/S2HarmonicDensity.py -> build/lib.linux-x86_64-cpython-311/lie_learn/probability
      copying lie_learn/probability/SO3HarmonicDensity.py -> build/lib.linux-x86_64-cpython-311/lie_learn/probability
      copying lie_learn/probability/__init__.py -> build/lib.linux-x86_64-cpython-311/lie_learn/probability
      creating build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3
      copying lie_learn/representations/SO3/test_spherical_harmonics.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3
      copying lie_learn/representations/SO3/indexing.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3
      copying lie_learn/representations/SO3/test_SO3_irrep_bases.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3
      copying lie_learn/representations/SO3/spherical_harmonics.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3
      copying lie_learn/representations/SO3/__init__.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3
      copying lie_learn/representations/SO3/test_wigner_d.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3
      copying lie_learn/representations/SO3/wigner_d.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3
      copying lie_learn/representations/SO3/clebsch_gordan_numerical.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3
      creating build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3/pinchon_hoggan
      copying lie_learn/representations/SO3/pinchon_hoggan/pinchon_hoggan_parsing.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3/pinchon_hoggan
      copying lie_learn/representations/SO3/pinchon_hoggan/download.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3/pinchon_hoggan
      copying lie_learn/representations/SO3/pinchon_hoggan/__init__.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3/pinchon_hoggan
      copying lie_learn/representations/SO3/pinchon_hoggan/pinchon_hoggan_dense.py -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3/pinchon_hoggan
      running egg_info
      writing lie_learn.egg-info/PKG-INFO
      writing dependency_links to lie_learn.egg-info/dependency_links.txt
      writing requirements to lie_learn.egg-info/requires.txt
      writing top-level names to lie_learn.egg-info/top_level.txt
      reading manifest file 'lie_learn.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'lie_learn.egg-info/SOURCES.txt'
      copying lie_learn/spaces/spherical_quadrature.c -> build/lib.linux-x86_64-cpython-311/lie_learn/spaces
      copying lie_learn/groups/SO3.c -> build/lib.linux-x86_64-cpython-311/lie_learn/groups
      copying lie_learn/representations/SO3/irrep_bases.c -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3
      copying lie_learn/representations/SO3/pinchon_hoggan/J_block_0-150.npy -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3/pinchon_hoggan
      copying lie_learn/representations/SO3/pinchon_hoggan/J_dense_0-150.npy -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3/pinchon_hoggan
      copying lie_learn/representations/SO3/pinchon_hoggan/pinchon_hoggan.c -> build/lib.linux-x86_64-cpython-311/lie_learn/representations/SO3/pinchon_hoggan
      running build_ext
      building 'lie_learn.representations.SO3.irrep_bases' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/lie_learn
      creating build/temp.linux-x86_64-cpython-311/lie_learn/representations
      creating build/temp.linux-x86_64-cpython-311/lie_learn/representations/SO3
      gcc -pthread -B /home/server/miniconda3/envs/torch20/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/server/miniconda3/envs/torch20/include -fPIC -O2 -isystem /home/server/miniconda3/envs/torch20/include -fPIC -I/home/server/miniconda3/envs/torch20/lib/python3.11/site-packages/numpy/core/include -I/home/server/miniconda3/envs/torch20/include/python3.11 -c lie_learn/representations/SO3/irrep_bases.c -o build/temp.linux-x86_64-cpython-311/lie_learn/representations/SO3/irrep_bases.o
      lie_learn/representations/SO3/irrep_bases.c:209:12: fatal error: longintrepr.h: No such file or directory
        209 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lie_learn
  Running setup.py clean for lie_learn
Failed to build lie_learn
ERROR: Could not build wheels for lie_learn, which is required to install pyproject.toml-based projects

Any help?

psteinb commented 1 year ago

Might be worth a shot, to try:

$ python -m pip install git+https://github.com/AMLab-Amsterdam/lie_learn

Also, look at the instructions that @kalekundert gave in #26