threeML / hawc_hal

HAWC Accelerated Likelihood - python-only framework for HAWC data analysis
BSD 3-Clause "New" or "Revised" License
11 stars 21 forks source link

root-numpy installation #74

Closed SaraCDL closed 2 years ago

SaraCDL commented 2 years ago

During the installation procedure, when root-numpy is trying to be installed after doing

mamba create --name new_hal -c conda-forge -c threeml numpy scipy matplotlib ipython numba reproject "astromodels>=2" "threeml>=2" root
conda activate new_hal

the following error is displayed:

Collecting root_numpy
  Using cached root_numpy-4.8.0.tar.gz (520 kB)
  Preparing metadata (setup.py) ... done
Skipping wheel build for root_numpy, due to binaries being disabled for it.
Installing collected packages: root_numpy
  Running setup.py install for root_numpy ... error
  error: subprocess-exited-with-error

  × Running setup.py install for root_numpy did not run successfully.
  │ exit code: 1
  ╰─> [137 lines of output]
      running install
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,

                       _
       _ __ ___   ___ | |_     _ __  _   _ _ __ ___  _ __  _   _
      | '__/ _ \ / _ \| __|   | '_ \| | | | '_ ` _ \| '_ \| | | |
      | | | (_) | (_) | |_    | | | | |_| | | | | | | |_) | |_| |
      |_|  \___/ \___/ \__|___|_| |_|\__,_|_| |_| |_| .__/ \__, |  4.8.0
                         |_____|                    |_|    |___/

      writing 'root_numpy/config.json'
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.7
      creating build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_graph.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_warnings.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_tree.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/info.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_sample.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/__init__.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_evaluate.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_hist.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/setup_utils.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_utils.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_array.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_matrix.py -> build/lib.linux-x86_64-3.7/root_numpy
      creating build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_array.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_evaluate.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/__init__.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_utils.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_tree.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_sample.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_hist.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      creating build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/__init__.py -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      creating build/lib.linux-x86_64-3.7/root_numpy/extern
      copying root_numpy/extern/six.py -> build/lib.linux-x86_64-3.7/root_numpy/extern
      copying root_numpy/extern/ordereddict.py -> build/lib.linux-x86_64-3.7/root_numpy/extern
      copying root_numpy/extern/__init__.py -> build/lib.linux-x86_64-3.7/root_numpy/extern
      creating build/lib.linux-x86_64-3.7/root_numpy/tmva
      copying root_numpy/tmva/tests.py -> build/lib.linux-x86_64-3.7/root_numpy/tmva
      copying root_numpy/tmva/__init__.py -> build/lib.linux-x86_64-3.7/root_numpy/tmva
      copying root_numpy/tmva/_evaluate.py -> build/lib.linux-x86_64-3.7/root_numpy/tmva
      copying root_numpy/tmva/_data.py -> build/lib.linux-x86_64-3.7/root_numpy/tmva
      copying root_numpy/testdata/string.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/vary1.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/struct.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/object2.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/fixed2.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/single2.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/directories.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/ntuple.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/test.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/trees.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/vary2.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/fixed1.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/object1.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/vector.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/single1.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/config.json -> build/lib.linux-x86_64-3.7/root_numpy
      running build_ext
      building 'root_numpy._librootnumpy' extension
      creating build/temp.linux-x86_64-3.7
      creating build/temp.linux-x86_64-3.7/root_numpy
      creating build/temp.linux-x86_64-3.7/root_numpy/src
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/bin/x86_64-conda-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include -fPIC -Iroot_numpy/src -I/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include/python3.7m -I/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib/python3.7/site-packages/numpy/core/include -c root_numpy/src/_librootnumpy.cpp -o build/temp.linux-x86_64-3.7/root_numpy/src/_librootnumpy.o -pthread -std=c++17 -m64 -I/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include -Wno-unused-function -Wno-write-strings
      cc1plus: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
      In file included from /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969,
                       from /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                       from root_numpy/src/_librootnumpy.cpp:581:
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/bin/x86_64-conda-linux-gnu-c++ -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib -L/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib -L/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib -Wl,-rpath-link,/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib -L/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include build/temp.linux-x86_64-3.7/root_numpy/src/_librootnumpy.o -o build/lib.linux-x86_64-3.7/root_numpy/_librootnumpy.cpython-37m-x86_64-linux-gnu.so -L/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib -lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lROOTVecOps -lTree -lTreePlayer -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc -lROOTDataFrame -Wl,-rpath,/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib -pthread -lm -ldl -rdynamic -lTreePlayer
      building 'root_numpy.tmva._libtmvanumpy' extension
      creating build/temp.linux-x86_64-3.7/root_numpy/tmva
      creating build/temp.linux-x86_64-3.7/root_numpy/tmva/src
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/bin/x86_64-conda-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include -fPIC -DNEW_TMVA_API -Iroot_numpy/src -Iroot_numpy/tmva/src -I/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include/python3.7m -I/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib/python3.7/site-packages/numpy/core/include -c root_numpy/tmva/src/_libtmvanumpy.cpp -o build/temp.linux-x86_64-3.7/root_numpy/tmva/src/_libtmvanumpy.o -pthread -std=c++17 -m64 -I/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include -Wno-unused-function -Wno-write-strings
      cc1plus: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
      In file included from /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969,
                       from /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                       from root_numpy/tmva/src/_libtmvanumpy.cpp:581:
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      root_numpy/tmva/src/evaluate.pyx: In function 'PyObject* __pyx_f_13_libtmvanumpy_evaluate_twoclass(TMVA::MethodBase*, PyArrayObject*, double)':
      root_numpy/tmva/src/evaluate.pyx:59:20: error: 'const TMVA::Event* TMVA::MethodBase::fTmpEvent' is protected within this context
         59 |     _method.fTmpEvent = event
            |                    ^~~~~~~~~
      In file included from root_numpy/tmva/src/_libtmvanumpy.cpp:598:
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include/TMVA/MethodBase.h:445:28: note: declared protected here
        445 |       mutable const Event *fTmpEvent; //! temporary event when testing on a different DataSet than the own one
            |                            ^~~~~~~~~
      root_numpy/tmva/src/evaluate.pyx:69:20: error: 'const TMVA::Event* TMVA::MethodBase::fTmpEvent' is protected within this context
         69 |     _method.fTmpEvent = NULL
            |                    ^~~~~~~~~
      In file included from root_numpy/tmva/src/_libtmvanumpy.cpp:598:
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include/TMVA/MethodBase.h:445:28: note: declared protected here
        445 |       mutable const Event *fTmpEvent; //! temporary event when testing on a different DataSet than the own one
            |                            ^~~~~~~~~
      root_numpy/tmva/src/evaluate.pyx: In function 'PyObject* __pyx_f_13_libtmvanumpy_evaluate_multiclass(TMVA::MethodBase*, PyArrayObject*, unsigned int)':
      root_numpy/tmva/src/evaluate.pyx:82:20: error: 'const TMVA::Event* TMVA::MethodBase::fTmpEvent' is protected within this context
         82 |     _method.fTmpEvent = event
            |                    ^~~~~~~~~
      In file included from root_numpy/tmva/src/_libtmvanumpy.cpp:598:
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include/TMVA/MethodBase.h:445:28: note: declared protected here
        445 |       mutable const Event *fTmpEvent; //! temporary event when testing on a different DataSet than the own one
            |                            ^~~~~~~~~
      root_numpy/tmva/src/evaluate.pyx:88:20: error: 'const TMVA::Event* TMVA::MethodBase::fTmpEvent' is protected within this context
         88 |     _method.fTmpEvent = NULL
            |                    ^~~~~~~~~
      In file included from root_numpy/tmva/src/_libtmvanumpy.cpp:598:
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include/TMVA/MethodBase.h:445:28: note: declared protected here
        445 |       mutable const Event *fTmpEvent; //! temporary event when testing on a different DataSet than the own one
            |                            ^~~~~~~~~
      root_numpy/tmva/src/evaluate.pyx: In function 'PyObject* __pyx_f_13_libtmvanumpy_evaluate_regression(TMVA::MethodBase*, PyArrayObject*, unsigned int)':
      root_numpy/tmva/src/evaluate.pyx:101:20: error: 'const TMVA::Event* TMVA::MethodBase::fTmpEvent' is protected within this context
        101 |     _method.fTmpEvent = event
            |                    ^~~~~~~~~
      In file included from root_numpy/tmva/src/_libtmvanumpy.cpp:598:
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include/TMVA/MethodBase.h:445:28: note: declared protected here
        445 |       mutable const Event *fTmpEvent; //! temporary event when testing on a different DataSet than the own one
            |                            ^~~~~~~~~
      root_numpy/tmva/src/evaluate.pyx:107:20: error: 'const TMVA::Event* TMVA::MethodBase::fTmpEvent' is protected within this context
        107 |     _method.fTmpEvent = NULL
            |                    ^~~~~~~~~
      In file included from root_numpy/tmva/src/_libtmvanumpy.cpp:598:
      /data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/include/TMVA/MethodBase.h:445:28: note: declared protected here
        445 |       mutable const Event *fTmpEvent; //! temporary event when testing on a different DataSet than the own one
            |                            ^~~~~~~~~
      error: command '/data/disk01/home/sara/hawc_software/miniconda3/envs/new_hal/bin/x86_64-conda-linux-gnu-cc' failed with exit status 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.
╰─> root_numpy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I tried then to use uproot but, the 3ML codes just don't recognize it.

torresramiro350 commented 2 years ago

Can confirm this happening to me in my laptop running Linux. Here are the details of my OS, if needed:

VERSION="35 (Workstation Edition)"
ID=fedora
VERSION_ID=35
VERSION_CODENAME=""
PLATFORM_ID="platform:f35"
PRETTY_NAME="Fedora Linux 35 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:35"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f35/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=35
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=35
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation
xiaojieww commented 2 years ago

Seems related to the deprecated NumPy API and TMVA package in the root_numpy. Try to modify the npy_1_7_deprecated_api.h with the recommendation below:

/data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

New errors came out:

pip install --no-binary :all: root_numpy
Collecting root_numpy
  Using cached root_numpy-4.8.0.tar.gz (520 kB)
  Preparing metadata (setup.py) ... done
Skipping wheel build for root_numpy, due to binaries being disabled for it.
Installing collected packages: root_numpy
  Running setup.py install for root_numpy ... error
  error: subprocess-exited-with-error

  × Running setup.py install for root_numpy did not run successfully.
  │ exit code: 1
  ╰─> [80 lines of output]
      running install
      /data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,
                      _
       _ __ ___   ___ | |_     _ __  _   _ _ __ ___  _ __  _   _
      | '__/ _ \ / _ \| __|   | '_ \| | | | '_ ` _ \| '_ \| | | |
      | | | (_) | (_) | |_    | | | | |_| | | | | | | |_) | |_| |
      |_|  \___/ \___/ \__|___|_| |_|\__,_|_| |_| |_| .__/ \__, |  4.8.0
                         |_____|                    |_|    |___/

      writing 'root_numpy/config.json'
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.7
      creating build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_graph.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_warnings.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_tree.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/info.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_sample.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/__init__.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_evaluate.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_hist.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/setup_utils.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_utils.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_array.py -> build/lib.linux-x86_64-3.7/root_numpy
      copying root_numpy/_matrix.py -> build/lib.linux-x86_64-3.7/root_numpy
      creating build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_array.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_evaluate.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/__init__.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_utils.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_tree.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_sample.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      copying root_numpy/tests/test_hist.py -> build/lib.linux-x86_64-3.7/root_numpy/tests
      creating build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/__init__.py -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      creating build/lib.linux-x86_64-3.7/root_numpy/extern
      copying root_numpy/extern/six.py -> build/lib.linux-x86_64-3.7/root_numpy/extern
      copying root_numpy/extern/ordereddict.py -> build/lib.linux-x86_64-3.7/root_numpy/extern
      copying root_numpy/extern/__init__.py -> build/lib.linux-x86_64-3.7/root_numpy/extern
      creating build/lib.linux-x86_64-3.7/root_numpy/tmva
      copying root_numpy/tmva/tests.py -> build/lib.linux-x86_64-3.7/root_numpy/tmva
      copying root_numpy/tmva/__init__.py -> build/lib.linux-x86_64-3.7/root_numpy/tmva
      copying root_numpy/tmva/_evaluate.py -> build/lib.linux-x86_64-3.7/root_numpy/tmva
      copying root_numpy/tmva/_data.py -> build/lib.linux-x86_64-3.7/root_numpy/tmva
      copying root_numpy/testdata/string.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/vary1.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/struct.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/object2.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/fixed2.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/single2.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/directories.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/ntuple.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/test.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/trees.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/vary2.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/fixed1.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/object1.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/vector.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/testdata/single1.root -> build/lib.linux-x86_64-3.7/root_numpy/testdata
      copying root_numpy/config.json -> build/lib.linux-x86_64-3.7/root_numpy
      running build_ext
      building 'root_numpy._librootnumpy' extension
      creating build/temp.linux-x86_64-3.7
      creating build/temp.linux-x86_64-3.7/root_numpy
      creating build/temp.linux-x86_64-3.7/root_numpy/src
      /data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/bin/x86_64-conda-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/include -fPIC -Iroot_numpy/src -I/data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/include/python3.7m -I/data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/lib/python3.7/site-packages/numpy/core/include -c root_numpy/src/_librootnumpy.cpp -o build/temp.linux-x86_64-3.7/root_numpy/src/_librootnumpy.o -pthread -std=c++17 -m64 -I/data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/include -Wno-unused-function -Wno-write-strings
      cc1plus: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
      In file included from /data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:124,
                       from /data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969,
                       from /data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                       from root_numpy/src/_librootnumpy.cpp:581:
      /data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/lib/python3.7/site-packages/numpy/core/include/numpy/old_defines.h:6:2: error: #error The header "old_defines.h" is deprecated as of NumPy 1.7.
          6 | #error The header "old_defines.h" is deprecated as of NumPy 1.7.
            |  ^~~~~
      error: command '/data/disk01/home/xiaojiew/hawc_software/miniconda3/envs/new_hal_20220329/bin/x86_64-conda-linux-gnu-cc' failed with exit status 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.
╰─> root_numpy

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

@henrikef Do you have any suggestions or insight into this?

henrikef commented 2 years ago

Is this still an ongoing issue?

henrikef commented 2 years ago

@xiaojieww can you confirm that this is solved by using conda/mamba to install root_numpy? I'm now seeing this issues also in the automated tests, e.g. on #71 . The installation command will need to be changed in the github actions as well.

xiaojieww commented 2 years ago

@xiaojieww can you confirm that this is solved by using conda/mamba to install root_numpy? I'm now seeing this issues also in the automated tests, e.g. on #71 . The installation command will need to be changed in the github actions as well.

Just confirmed this issue can be solved by using mamba to install root_numpy with the command line mamba install -c conda-forge root_numpy.

We can consider changing the README.md, removing the pip install --no-binary :all: root_numpy, change the guideline with the command line mamba install -c conda-forge root_numpy.

After this, I suppose we can close this issue as well.

torresramiro350 commented 2 years ago

This has been addressed on #78 by removing root-numpy in favor on uproot.