terrier-org / pyterrier

A Python framework for performing information retrieval experiments, building on http://terrier.org/

Home Page:https://pyterrier.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I am trying to install python-terrier in windows/ubuntu both have same problem, problem is that legacy install failure error. Please give me some solution to install python terrier, Thank you.

222112Akki opened this issue · comments

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Which index
  2. Which retrieval
  3. What pipeline
  4. What was the dataframe output
  5. See error

Expected behavior
A clear and concise description of what you expected to happen.

Documentation and Issues

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Can you provide more information? Like the Python version and the error message?

Please feel free to edit the report textbox

I am trying to install python-terrier in windows/ubuntu both have same problem, problem is that legacy install failure error. Please give me some solution.

C:\Users\akkiy>pip install python-terrier
Collecting python-terrier
Using cached python-terrier-0.9.2.tar.gz (104 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\akkiy\appdata\local\programs\python\python311\lib\site-packages
ython-terrier) (1.24.1)
Requirement already satisfied: pandas in c:\users\akkiy\appdata\local\programs\python\python311\lib\site-package
python-terrier) (1.5.3)
Requirement already satisfied: wget in c:\users\akkiy\appdata\local\programs\python\python311\lib\site-packages
thon-terrier) (3.2)
Collecting tqdm
Using cached tqdm-4.65.0-py3-none-any.whl (77 kB)
Collecting pyjnius>=1.4.2
Using cached pyjnius-1.4.2-cp311-cp311-win_amd64.whl
Collecting matchpy
Using cached matchpy-0.5.5-py3-none-any.whl (69 kB)
Collecting scikit-learn
Using cached scikit_learn-1.2.2-cp311-cp311-win_amd64.whl (8.3 MB)
Collecting deprecated
Using cached Deprecated-1.2.13-py2.py3-none-any.whl (9.6 kB)
Collecting chest
Using cached chest-0.2.3.tar.gz (9.6 kB)
Preparing metadata (setup.py) ... done
Collecting scipy
Using cached scipy-1.10.1-cp311-cp311-win_amd64.whl (42.2 MB)
Collecting requests
Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Collecting joblib
Using cached joblib-1.2.0-py3-none-any.whl (297 kB)
Collecting nptyping==1.4.4
Using cached nptyping-1.4.4-py3-none-any.whl (31 kB)
Collecting more_itertools
Using cached more_itertools-9.1.0-py3-none-any.whl (54 kB)
Collecting ir_datasets>=0.3.2
Using cached ir_datasets-0.5.4-py3-none-any.whl (311 kB)
Collecting jinja2
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting statsmodels
Using cached statsmodels-0.13.5-cp311-cp311-win_amd64.whl (9.0 MB)
Collecting ir_measures>=0.3.1
Using cached ir_measures-0.3.1.tar.gz (46 kB)
Preparing metadata (setup.py) ... done
Collecting dill
Using cached dill-0.3.6-py3-none-any.whl (110 kB)
Collecting pytrec_eval_terrier>=0.5.3
Using cached pytrec_eval-terrier-0.5.5.tar.gz (16 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: typish>=1.7.0 in c:\users\akkiy\appdata\local\programs\python\python311\lib\site-
(from nptyping==1.4.4->python-terrier) (1.9.3)
Collecting beautifulsoup4>=4.4.1
Using cached beautifulsoup4-4.11.2-py3-none-any.whl (129 kB)
Collecting lxml>=4.5.2
Using cached lxml-4.9.2-cp311-cp311-win_amd64.whl (3.8 MB)
Collecting pyyaml>=5.3.1
Using cached PyYAML-6.0-cp311-cp311-win_amd64.whl (143 kB)
Collecting trec-car-tools>=2.5.4
Using cached trec_car_tools-2.6-py3-none-any.whl (8.4 kB)
Collecting lz4>=3.1.1
Using cached lz4-4.3.2-cp311-cp311-win_amd64.whl (99 kB)
Requirement already satisfied: warc3-wet>=0.2.3 in c:\users\akkiy\appdata\local\programs\python\python311\lib\si
ges (from ir_datasets>=0.3.2->python-terrier) (0.2.3)
Requirement already satisfied: warc3-wet-clueweb09>=0.2.5 in c:\users\akkiy\appdata\local\programs\python\python
site-packages (from ir_datasets>=0.3.2->python-terrier) (0.2.5)
Collecting zlib-state>=0.1.3
Using cached zlib-state-0.1.5.tar.gz (9.4 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: ijson>=3.1.3 in c:\users\akkiy\appdata\local\programs\python\python311\lib\site-p
(from ir_datasets>=0.3.2->python-terrier) (3.2.0.post0)
Collecting pyautocorpus>=0.1.1
Using cached pyautocorpus-0.1.9-cp311-cp311-win_amd64.whl (7.1 kB)
Collecting unlzw3>=0.2.1
Using cached unlzw3-0.2.2-py3-none-any.whl (6.1 kB)
Collecting cwl-eval>=1.0.10
Using cached cwl-eval-1.0.12.tar.gz (31 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: six>=1.7.0 in c:\users\akkiy\appdata\local\programs\python\python311\lib\site-pac
rom pyjnius>=1.4.2->python-terrier) (1.16.0)
Collecting charset-normalizer<4,>=2
Using cached charset_normalizer-3.1.0-cp311-cp311-win_amd64.whl (96 kB)
Collecting idna<4,>=2.5
Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.15-py2.py3-none-any.whl (140 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting colorama
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Requirement already satisfied: heapdict in c:\users\akkiy\appdata\local\programs\python\python311\lib\site-packa
m chest->python-terrier) (1.0.1)
Collecting wrapt<2,>=1.10
Using cached wrapt-1.15.0-cp311-cp311-win_amd64.whl (36 kB)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.1.2-cp311-cp311-win_amd64.whl (16 kB)
Requirement already satisfied: multiset<3.0,>=2.0 in c:\users\akkiy\appdata\local\programs\python\python311\lib
kages (from matchpy->python-terrier) (2.1.1)
Requirement already satisfied: python-dateutil>=2.8.1 in c:\users\akkiy\appdata\local\programs\python\python311
-packages (from pandas->python-terrier) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in c:\users\akkiy\appdata\local\programs\python\python311\lib\site-p
(from pandas->python-terrier) (2022.7.1)
Collecting threadpoolctl>=2.0.0
Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting patsy>=0.5.2
Using cached patsy-0.5.3-py2.py3-none-any.whl (233 kB)
Collecting packaging>=21.3
Using cached packaging-23.0-py3-none-any.whl (42 kB)
Collecting soupsieve>1.2
Using cached soupsieve-2.4-py3-none-any.whl (37 kB)
Requirement already satisfied: cbor>=1.0.0 in c:\users\akkiy\appdata\local\programs\python\python311\lib\site-pa
from trec-car-tools>=2.5.4->ir_datasets>=0.3.2->python-terrier) (1.0.0)
Installing collected packages: zlib-state, wrapt, urllib3, unlzw3, trec-car-tools, threadpoolctl, soupsieve, sci
ml, pytrec_eval_terrier, pyjnius, pyautocorpus, patsy, packaging, nptyping, more_itertools, matchpy, MarkupSafe,
ml, joblib, idna, dill, cwl-eval, colorama, chest, charset-normalizer, certifi, tqdm, scikit-learn, requests, ji
_measures, deprecated, beautifulsoup4, statsmodels, ir_datasets, python-terrier
DEPRECATION: zlib-state is being installed using the legacy 'setup.py install' method, because it does not hav
roject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible r
nt is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559
Running setup.py install for zlib-state ... error
error: subprocess-exited-with-error

x Running setup.py install for zlib-state did not run successfully.
│ exit code: 1
?─> [25 lines of output]
running install
C:\Users\akkiy\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34:
olsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\zlib_state
copying zlib_state_init_.py -> build\lib.win-amd64-cpython-311\zlib_state
running egg_info
writing zlib_state.egg-info\PKG-INFO
writing dependency_links to zlib_state.egg-info\dependency_links.txt
writing top-level names to zlib_state.egg-info\top_level.txt
reading manifest file 'zlib_state.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'zlib_state.egg-info\SOURCES.txt'
running build_ext
building '_zlib_state' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\src
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.e
nologo /O2 /W3 /GL /DNDEBUG /MD "-IC:/Program Files/zlib\include" -IC:\Users\akkiy\AppData\Local\Programs\Python
11\include -IC:\Users\akkiy\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files\Microsoft Visual
2022\Professional\VC\Tools\MSVC\14.35.32215\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Profession
xiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x8
ws Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "
gram Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\includ
2000.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc/zlib_state.c /Fobuild\t
amd64-cpython-311\Release\src/zlib_state.obj
zlib_state.c
src/zlib_state.c(7): fatal error C1083: Cannot open include file: 'C:/Program Files/zlib/include/zlib.h':
file or directory
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.322
\HostX86\x64\cl.exe' failed with exit code 2
[end of output]

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

x Encountered error while trying to install package.
?─> zlib-state

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

It seems zlib state is not available for Python 3.11 on Windows. Try Python 3.7-3.10.

screenshot 2023-03-15 at 19 22 02
please give me some solution to solve this problem

As I said earlier, the solution is to use an older Python version anything between 3.7 & 3.10 is fine.

You can try Anaconda for creating Python virtual environments.

Did it work @222112Akki ?

No update, assuming its solved.