AmenRa / ranx

⚡️A Blazing-Fast Python Library for Ranking Evaluation, Comparison, and Fusion 🐍
https://amenra.github.io/ranx
MIT License
427 stars 23 forks source link

Ranx pip installing failed #28

Closed celsofranssa closed 1 year ago

celsofranssa commented 1 year ago

Describe the bug Error during pip install.

To Reproduce pip install ranx==0.3.2

Bash output

(xCoFormer) celso@capri:~/projects/xCoFormer$ pip install ranx==0.3.2
Collecting ranx==0.3.2
  Using cached ranx-0.3.2-py3-none-any.whl (93 kB)
Requirement already satisfied: numpy in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ranx==0.3.2) (1.22.4)
Requirement already satisfied: tqdm in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ranx==0.3.2) (4.64.1)
Requirement already satisfied: scipy>=1.6.0 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ranx==0.3.2) (1.9.3)
Collecting lz4
  Using cached lz4-4.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB)
Collecting cbor2
  Using cached cbor2-5.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (224 kB)
Collecting ir-datasets
  Using cached ir_datasets-0.5.4-py3-none-any.whl (311 kB)
Collecting statsmodels
  Using cached statsmodels-0.13.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.0 MB)
Requirement already satisfied: pandas in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ranx==0.3.2) (1.4.4)
Requirement already satisfied: rich in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ranx==0.3.2) (12.6.0)
Collecting orjson
  Using cached orjson-3.8.0-cp310-cp310-manylinux_2_28_x86_64.whl (146 kB)
Requirement already satisfied: tabulate in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ranx==0.3.2) (0.9.0)
Collecting numba>=0.54.1
  Using cached numba-0.56.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.5 MB)
Collecting llvmlite<0.40,>=0.39.0dev0
  Using cached llvmlite-0.39.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.6 MB)
Requirement already satisfied: setuptools in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from numba>=0.54.1->ranx==0.3.2) (59.6.0)
Requirement already satisfied: zlib-state>=0.1.3 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ir-datasets->ranx==0.3.2) (0.1.5)
Collecting lxml>=4.5.2
  Using cached lxml-4.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (6.9 MB)
Requirement already satisfied: ijson>=3.1.3 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ir-datasets->ranx==0.3.2) (3.1.4)
Requirement already satisfied: trec-car-tools>=2.5.4 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ir-datasets->ranx==0.3.2) (2.6)
Requirement already satisfied: requests>=2.22.0 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ir-datasets->ranx==0.3.2) (2.28.1)
Requirement already satisfied: pyyaml>=5.3.1 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ir-datasets->ranx==0.3.2) (6.0)
Collecting pyautocorpus>=0.1.1
  Using cached pyautocorpus-0.1.8.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: unlzw3>=0.2.1 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ir-datasets->ranx==0.3.2) (0.2.1)
Collecting beautifulsoup4>=4.4.1
  Using cached beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
Requirement already satisfied: warc3-wet>=0.2.3 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ir-datasets->ranx==0.3.2) (0.2.3)
Requirement already satisfied: warc3-wet-clueweb09>=0.2.5 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from ir-datasets->ranx==0.3.2) (0.2.5)
Requirement already satisfied: python-dateutil>=2.8.1 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from pandas->ranx==0.3.2) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from pandas->ranx==0.3.2) (2022.5)
Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from rich->ranx==0.3.2) (2.13.0)
Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from rich->ranx==0.3.2) (0.9.1)
Collecting patsy>=0.5.2
  Using cached patsy-0.5.3-py2.py3-none-any.whl (233 kB)
Requirement already satisfied: packaging>=21.3 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from statsmodels->ranx==0.3.2) (21.3)
Requirement already satisfied: soupsieve>1.2 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from beautifulsoup4>=4.4.1->ir-datasets->ranx==0.3.2) (2.3.2.post1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from packaging>=21.3->statsmodels->ranx==0.3.2) (3.0.9)
Requirement already satisfied: six in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from patsy>=0.5.2->statsmodels->ranx==0.3.2) (1.16.0)
Requirement already satisfied: idna<4,>=2.5 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from requests>=2.22.0->ir-datasets->ranx==0.3.2) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from requests>=2.22.0->ir-datasets->ranx==0.3.2) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from requests>=2.22.0->ir-datasets->ranx==0.3.2) (2022.9.24)
Requirement already satisfied: charset-normalizer<3,>=2 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from requests>=2.22.0->ir-datasets->ranx==0.3.2) (2.1.1)
Requirement already satisfied: cbor>=1.0.0 in /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages (from trec-car-tools>=2.5.4->ir-datasets->ranx==0.3.2) (1.0.0)
Building wheels for collected packages: pyautocorpus
  Building wheel for pyautocorpus (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'pyautocorpus' extension
      creating build
      creating build/temp.linux-x86_64-3.10
      creating build/temp.linux-x86_64-3.10/src
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPCRE_STATIC -I/tmp/pip-install-g3fc194j/pyautocorpus_51c04bb4f6a3404393baddede408d7df/AutoCorpus/src/common -I/tmp/pip-install-g3fc194j/pyautocorpus_51c04bb4f6a3404393baddede408d7df/AutoCorpus/src/wikipedia -I/home/celso/projects/venvs/xCoFormer/include -I/usr/include/python3.10 -c src/Textifier.cpp -o build/temp.linux-x86_64-3.10/src/Textifier.o -std=c++11
      src/Textifier.cpp:40:10: fatal error: pcre.h: No such file or directory
         40 | #include <pcre.h>
            |          ^~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-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 pyautocorpus
  Running setup.py clean for pyautocorpus
Failed to build pyautocorpus
Installing collected packages: pyautocorpus, patsy, orjson, lz4, lxml, llvmlite, cbor2, beautifulsoup4, numba, ir-datasets, statsmodels, ranx
  Running setup.py install for pyautocorpus ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pyautocorpus did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      running install
      /home/celso/projects/venvs/xCoFormer/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      building 'pyautocorpus' extension
      creating build
      creating build/temp.linux-x86_64-3.10
      creating build/temp.linux-x86_64-3.10/src
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPCRE_STATIC -I/tmp/pip-install-g3fc194j/pyautocorpus_51c04bb4f6a3404393baddede408d7df/AutoCorpus/src/common -I/tmp/pip-install-g3fc194j/pyautocorpus_51c04bb4f6a3404393baddede408d7df/AutoCorpus/src/wikipedia -I/home/celso/projects/venvs/xCoFormer/include -I/usr/include/python3.10 -c src/Textifier.cpp -o build/temp.linux-x86_64-3.10/src/Textifier.o -std=c++11
      src/Textifier.cpp:40:10: fatal error: pcre.h: No such file or directory
         40 | #include <pcre.h>
            |          ^~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-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: legacy-install-failure

× Encountered error while trying to install package.
╰─> pyautocorpus

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Env:

AmenRa commented 1 year ago

Hi,

I tried to reproduce the error, but the installation works on my end.

By reading your reported pip output, the error arises when installing pyautocorpus.

I suggest you to retry installing ranx. If it fails, try to install pyautocorpus. If that also fails, report the bug on pyautocorpus GitHub page.

Let me know if the error keeps showing up.

Best,

Elias