HEPData / hepdata_lib

Library for getting your data into HEPData
https://hepdata-lib.readthedocs.io
MIT License
16 stars 39 forks source link

Pip(3) version is outdated #230

Closed IzaakWN closed 1 year ago

IzaakWN commented 1 year ago

I would like to report an installation issue I ran into with pip.

To get hepdata_lib to work on my machine (PSI's T3) where my input files are, I had to modify the installation command with pip to pip3, e.g.

source $VO_CMS_SW_DIR/cmsset_default.sh
export CMSSW=CMSSW_11_2_5_hepdata
export SCRAM_ARCH=slc7_amd64_gcc900
scram p -n CMSSW_11_2_5_hepdata CMSSW CMSSW_11_2_5 # cmsrel
cd $CMSSW/src/ && cmsenv
pip3 install hepdata_lib --user # old version

However, go some errors for empty bins, e.g.

$ hepdata-validate -a submission.tar.gz
...
     error - Uncertainties should not all be zero in 'dependent_variables.values[0].errors'

because apparently the hepdata_lib version via pip(3) was relatively old:

$ pip3 list | grep hepdata
hepdata-lib                        0.4.1
hepdata-validator                  0.3.3

To fix this, I had to get the latest one with

$ pip3 install --user https://github.com/HEPData/hepdata_lib/archive/master.zip # latest version
$ pip3 list | grep hepdata
hepdata-lib                        0.12.0
hepdata-validator                  0.3.3

Is it possible to change the default hepdata_lib version installed by pip to prevent this issue for other users?

GraemeWatt commented 1 year ago

The latest version v0.12.0 of hepdata_lib is already available in PyPI: https://pypi.org/project/hepdata-lib/

I think the issue is that an old version of hepdata_lib v0.4.1 must already be installed in your environment. To upgrade it, use the --upgrade option: pip3 install hepdata_lib --user --upgrade

clelange commented 1 year ago

Hi @IzaakWN - thanks for reporting this issue. However, it is not a pip or hepdata_lib issue, but it's related to the CMSSW release you're using and hepdata_lib already being installed there (the old version you see there). Also, pip/pip3 are provided by CMSSW.

I would advise against using CMSSW and I think we need to remove https://hepdata-lib.readthedocs.io/en/latest/setup.html#setup-on-lxplus-with-cmssw. Instead, please try https://hepdata-lib.readthedocs.io/en/latest/setup.html#using-singularity instead and report any issues.