pytrec_eval: Pip install error on windows 10, possible hardcoded path
Hello, I got a series of errors like this:
File "C:\Users\myusername\AppData\Local\Continuum\anaconda3\lib\distutils\util.py", line 111, in convert_path raise ValueError("path '%s' cannot be absolute" % pathname) ValueError: path '/Users/cvangysel/Projects/pytrec_eval/trec_eval/convert_zscores.c' cannot be absolute
when I ran
pip install pytrec-eval
It seems that the absolute path is hardcoded somewhere. I modified the util.py file to ignore the prefix ‘/Users/cvangysel/Projects/pytrec_eval/trec_eval/’ and the installation seems to be successful (the example on README.md ran correctly).
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 8
- Comments: 19 (8 by maintainers)
Happy to help. Just to clarify, I only removed the prefix (the path) but kept the actual name of the file. E.g. “/Users/cvangysel/Projects/pytrec_eval/trec_eval/convert_zscores.c” --> “convert_zscores.c”
Something like:
Hi, I got exactly the same error and did just like you, thank you!
in
anaconda3\lib\distutils\util.py, I commented those lines to make it work:Also, in case it can help anyone else, I got another problem:
VS14.0 link.exe failed with exit status 1158I simply copy paste rc.exe and rc.dll from
C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64(or another build version) toC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64Using our fork,
pip install pytrec-eval-terriernow works on Window, Mac and Linux without compiling. Work by @seanmacavaney and myself.Perhaps you could submit a PR to ask them to change to the Windows compatible fork then?
Thank you! JonathanSamelson and Alkouf. I got exactly the same error and did just like you.
I created the Windows build for pytrec_eval. I’m not sure where you error has some from
However, I’m investigating Windows binary distributions. This works for me on Python 3.8 on Windows.
pip install -i https://test.pypi.org/simple/ pytrec-eval-craigm==0.5.20210329143631