So I am trying to install root_numpy however I get the following error:
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1777:0,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from root_numpy/src/_librootnumpy.cpp:283:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
root_numpy/src/_librootnumpy.cpp:308:26: fatal error: TTreeFormula.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I know it says the API version is depreciated but I am not sure where to disable it as it recommends…
My root version is 6.09
python version 2.7.12
gcc version is 5.4.0
ubuntu 16.04.1 LTS
Any help would be greatly appreciated!!
Also, sorry if this is slightly off topic for the forum. Not sure where else to post though…
Does the file $ROOTSYS/include/TTreeFormula.h actually exists?
Can you provide the actual compilation command that fails (your output is very reduced).
Does the file $ROOTSYS/include/TTreeFormula.h actually exists?
Can you provide the actual compilation command that fails (your output is very reduced).[/quote]
Hi,
I tried using “env NOTMVA=1 python setup.py install” but got the following error(in full)
sudo env NOTVMA=1 python setup.py install
_
_ __ ___ ___ | |_ _ __ _ _ _ __ ___ _ __ _ _
| '__/ _ \ / _ \| __| | '_ \| | | | '_ ` _ \| '_ \| | | |
| | | (_) | (_) | |_ | | | | |_| | | | | | | |_) | |_| |
|_| \___/ \___/ \__|___|_| |_|\__,_|_| |_| |_| .__/ \__, | 4.6.0.dev0
|_____| |_| |___/
running install
running bdist_egg
running egg_info
writing root_numpy.egg-info/PKG-INFO
writing top-level names to root_numpy.egg-info/top_level.txt
writing dependency_links to root_numpy.egg-info/dependency_links.txt
reading manifest file 'root_numpy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'AUTHORS'
writing manifest file 'root_numpy.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying root_numpy/config.json -> build/lib.linux-x86_64-2.7/root_numpy
running build_ext
building 'root_numpy._librootnumpy' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -Iroot_numpy/src -I/usr/include/python2.7 -c root_numpy/src/_librootnumpy.cpp -o build/temp.linux-x86_64-2.7/root_numpy/src/_librootnumpy.o -pthread -m64 -I/usr/include/root -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 /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1777:0,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from root_numpy/src/_librootnumpy.cpp:283:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
root_numpy/src/_librootnumpy.cpp:308:26: fatal error: TTreeFormula.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I tried installing it and specifying the install folder, after adding the folder to PYTHONPATH, but got the following error
sudo env NOTVMA=1 python setup.py install --prefix ../rootNumpy
_
_ __ ___ ___ | |_ _ __ _ _ _ __ ___ _ __ _ _
| '__/ _ \ / _ \| __| | '_ \| | | | '_ ` _ \| '_ \| | | |
| | | (_) | (_) | |_ | | | | |_| | | | | | | |_) | |_| |
|_| \___/ \___/ \__|___|_| |_|\__,_|_| |_| |_| .__/ \__, | 4.6.0.dev0
|_____| |_| |___/
running install
Checking .pth file support in ../rootNumpy/lib/python2.7/site-packages/
/usr/bin/python -E -c pass
TEST FAILED: ../rootNumpy/lib/python2.7/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
../rootNumpy/lib/python2.7/site-packages/
and your PYTHONPATH environment variable currently contains:
''
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
If I echo my PYTHONPATH is is not empty as stated in the error… Not sure what to do!
Also, TTreeFormula does exist and is in the location you specified.
Thanks!
[quote=“doubleAron”]Also, TTreeFormula does exist and is in the location you specified.[/quote]Probably that is wrong, as Pere asks for “$ROOTSYS/include/TTreeFormula.h” and the installation seems to think it should be under “/usr/include/root”.