I followed these topics:
https://devtalk.nvidia.com/default/topic/1044958/jetson-agx-xavier/scikit-learn-for-python-3-on-jetson-xavier/
https://devtalk.nvidia.com/default/topic/1049684/jetson-nano/errors-during-install-sklearn-/
https://github.com/scikit-learn/scikit-learn/issues/12707
python version: 3.6.9
Here are all commands I run:
sudo apt-get update
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev
sudo apt-get install python3-pip
sudo pip3 install -U pip testresources setuptools
sudo pip3 install -U numpy==1.16.1 future==0.17.1 mock==3.0.5 h5py==2.9.0 keras_preprocessing==1.0.5 keras_applications==1.0.8 gast==0.2.2 enum34 futures protobuf
sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v43 tensorflow-gpu==1.15.0+nv19.12
sudo apt-get install python3-opencv
sudo apt-get install python3-pandas
sudo apt-get install python3-keras
sudo apt-get install gfortran
sudo apt-get install python3-scipy
sudo apt-get install python3-matplotlib
sudo apt-get install python3-imageio
pip3 install dlib
sudo apt-get install -y build-essential libatlas-base-dev
pip3 install --upgrade setuptools
sudo pip3 install -U setuptools
sudo apt-get install libpcap-dev libpq-dev
sudo pip3 install cython
sudo pip3 install git+https://github.com/scikit-learn/scikit-learn.git
and I got the long error below
compile options: '-I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c'
aarch64-linux-gnu-gcc: scipy/cluster/_hierarchy.c
In file included from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from scipy/cluster/_hierarchy.c:598:
/usr/local/lib/python3.6/dist-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]
#warning "Using deprecated NumPy API, disable it with " \
^~~~~~~
scipy/cluster/_hierarchy.c:19289:18: warning: ‘__Pyx_CFunc_double____double____double____double____int____int____int___to_py’ defined but not used [-Wunused-function]
static PyObject *__Pyx_CFunc_double____double____double____double____int____int____int___to_py(double (*__pyx_v_f)(double, double, double, int, int, int)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scipy/cluster/_hierarchy.c: In function ‘__pyx_pw_5scipy_7cluster_10_hierarchy_27nn_chain’:
scipy/cluster/_hierarchy.c:13560:10: warning: ‘__pyx_v_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (__pyx_t_12) {
^
scipy/cluster/_hierarchy.c:13074:7: note: ‘__pyx_v_y’ was declared here
int __pyx_v_y;
^~~~~~~~~
scipy/cluster/_hierarchy.c: In function ‘__pyx_pw_5scipy_7cluster_10_hierarchy_23linkage’:
scipy/cluster/_hierarchy.c:11431:16: warning: ‘__pyx_v_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__pyx_t_23 = __pyx_v_y;
~~~~~~~~~~~^~~~~~~~~~~
scipy/cluster/_hierarchy.c:11060:7: note: ‘__pyx_v_y’ was declared here
int __pyx_v_y;
^~~~~~~~~
scipy/cluster/_hierarchy.c:11421:16: warning: ‘__pyx_v_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__pyx_t_22 = __pyx_v_x;
~~~~~~~~~~~^~~~~~~~~~~
scipy/cluster/_hierarchy.c:11059:7: note: ‘__pyx_v_x’ was declared here
int __pyx_v_x;
^~~~~~~~~
scipy/cluster/_hierarchy.c: In function ‘__pyx_pw_5scipy_7cluster_10_hierarchy_25fast_linkage’:
scipy/cluster/_hierarchy.c:12682:92: warning: ‘__pyx_v_dist’ may be used uninitialized in this function [-Wmaybe-uninitialized]
*((double *) ( /* dim=0 */ (__pyx_v_D.data + __pyx_t_44 * __pyx_v_D.strides[0]) )) = __pyx_v_new_dist((*((double *) ( /* dim=0 */ (__pyx_v_D.data + __pyx_t_42 * __pyx_v_D.strides[0]) ))), (*((double *) ( /* dim=0 */ (__pyx_v_D.data + __pyx_t_43 * __pyx_v_D.strides[0]) ))), __pyx_v_dist, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scipy/cluster/_hierarchy.c:11978:10: note: ‘__pyx_v_dist’ was declared here
double __pyx_v_dist;
^~~~~~~~~~~~
scipy/cluster/_hierarchy.c:11971:7: warning: ‘__pyx_v_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
int __pyx_v_y;
^~~~~~~~~
scipy/cluster/_hierarchy.c: In function ‘__pyx_pw_5scipy_7cluster_10_hierarchy_29mst_single_linkage’:
scipy/cluster/_hierarchy.c:14363:142: warning: ‘__pyx_v_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_Z.data + __pyx_t_25 * __pyx_v_Z.strides[0]) ) + __pyx_t_26 * __pyx_v_Z.strides[1]) )) = __pyx_v_y;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
scipy/cluster/_hierarchy.c:13995:7: note: ‘__pyx_v_y’ was declared here
int __pyx_v_y;
^~~~~~~~~
aarch64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.6/scipy/cluster/_hierarchy.o -Lbuild/temp.linux-aarch64-3.6 -o build/lib.linux-aarch64-3.6/scipy/cluster/_hierarchy.cpython-36m-aarch64-linux-gnu.so -Wl,--version-script=build/temp.linux-aarch64-3.6/link-version-scipy.cluster._hierarchy.map
building 'scipy.cluster._optimal_leaf_ordering' extension
compiling C sources
C compiler: aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
compile options: '-I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c'
aarch64-linux-gnu-gcc: scipy/cluster/_optimal_leaf_ordering.c
In file included from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from scipy/cluster/_optimal_leaf_ordering.c:598:
/usr/local/lib/python3.6/dist-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]
#warning "Using deprecated NumPy API, disable it with " \
^~~~~~~
scipy/cluster/_optimal_leaf_ordering.c: In function ‘__pyx_pf_5scipy_7cluster_22_optimal_leaf_ordering_optimal_leaf_ordering.isra.58’:
scipy/cluster/_optimal_leaf_ordering.c:4747:19: warning: ‘__pyx_v_best_w’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__pyx_t_117 = __pyx_v_best_w;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~
scipy/cluster/_optimal_leaf_ordering.c:3414:7: note: ‘__pyx_v_best_w’ was declared here
int __pyx_v_best_w;
^~~~~~~~~~~~~~
scipy/cluster/_optimal_leaf_ordering.c:4746:19: warning: ‘__pyx_v_best_u’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__pyx_t_116 = __pyx_v_best_u;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~
scipy/cluster/_optimal_leaf_ordering.c:3413:7: note: ‘__pyx_v_best_u’ was declared here
int __pyx_v_best_u;
^~~~~~~~~~~~~~
aarch64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.6/scipy/cluster/_optimal_leaf_ordering.o -Lbuild/temp.linux-aarch64-3.6 -o build/lib.linux-aarch64-3.6/scipy/cluster/_optimal_leaf_ordering.cpython-36m-aarch64-linux-gnu.so -Wl,--version-script=build/temp.linux-aarch64-3.6/link-version-scipy.cluster._optimal_leaf_ordering.map
C compiler: aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating /tmp/tmpvz7d4hd0/tmp
creating /tmp/tmpvz7d4hd0/tmp/tmpvz7d4hd0
compile options: '-I/usr/include/python3.6m -c'
extra options: '-std=c++14'
aarch64-linux-gnu-g++: /tmp/tmpvz7d4hd0/main.c
C compiler: aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating /tmp/tmp3j3pimiu/tmp
creating /tmp/tmp3j3pimiu/tmp/tmp3j3pimiu
compile options: '-I/usr/include/python3.6m -c'
extra options: '-std=c++14 -fvisibility=hidden'
aarch64-linux-gnu-g++: /tmp/tmp3j3pimiu/main.c
C compiler: aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating /tmp/tmpmxeh9kyu/tmp
creating /tmp/tmpmxeh9kyu/tmp/tmpmxeh9kyu
compile options: '-I/usr/include/python3.6m -c'
aarch64-linux-gnu-g++: /tmp/tmpmxeh9kyu/main.c
building 'scipy.fft._pocketfft.pypocketfft' extension
compiling C++ sources
C compiler: aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating build/temp.linux-aarch64-3.6/scipy/fft
creating build/temp.linux-aarch64-3.6/scipy/fft/_pocketfft
compile options: '-DPOCKETFFT_PTHREADS -I/home/dlinano/.local/include/python3.6m -I/usr/local/include/python3.6 -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c'
extra options: '-std=c++14 -fvisibility=hidden'
aarch64-linux-gnu-g++: scipy/fft/_pocketfft/pypocketfft.cxx
scipy/fft/_pocketfft/pypocketfft.cxx:15:10: fatal error: pybind11/pybind11.h: No such file or directory
#include <pybind11/pybind11.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Running from scipy source directory.
/usr/local/lib/python3.6/dist-packages/numpy/distutils/system_info.py:728: UserWarning: Specified path /usr/local/include/python3.6m is invalid.
return self.get_paths(self.section, key)
error: Command "aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPOCKETFFT_PTHREADS -I/home/dlinano/.local/include/python3.6m -I/usr/local/include/python3.6 -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c scipy/fft/_pocketfft/pypocketfft.cxx -o build/temp.linux-aarch64-3.6/scipy/fft/_pocketfft/pypocketfft.o -MMD -MF build/temp.linux-aarch64-3.6/scipy/fft/_pocketfft/pypocketfft.o.d -std=c++14 -fvisibility=hidden" failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-dfzx1730/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.28.5' 'numpy>=1.13.3' 'scipy>=0.19.1' Check the logs for full command output.
Please check this full logs:
https://drive.google.com/file/d/1gLcSq86Aic5uFoPr8k6Cp366eRB2tlfw/view?usp=sharing
This is what worked for me.
sudo -H pip3 install scikit-learn
Here is my full installation script for the order in which the dependencies are installed.
#tensorflow - zoo
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev
sudo apt-get install python3-pip
sudo -H pip3 install -U pip
sudo -H pip3 install -U numpy grpcio absl-py py-cpuinfo psutil portpicker six mock requests gast h5py astor==0.8.0 termcolor protobuf keras-applications keras-preprocessing wrapt google-pasta
sudo -H pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.14.0
#Cython
sudo -H pip3 install cython
#keras-zoo
sudo apt-get install -y build-essential libatlas-base-dev gfortran
sudo -H pip3 install keras
#Pandas
sudo -H pip3 install pandas
#Scipy
sudo -H python3 -m pip install scipy==1.1.0
#Sklearn
sudo -H pip3 install scikit-learn
I had problems with Jupyter (Jetson TX2)
I checked which numpy version is used by Jupyter.
import numpy as np
np.version.version
In My case it was 1.13 despite the fact that
$ pip3 list
showed me version 1.16 for numpy
I found solution here https://fooobar.com/questions/15251639/jupyter-notebook-picks-older-version-of-numpy
to see the numpy path
print (np.__path__)
in my case it was /usr/lib/python3/dist-packages
went to the directory and removed old version numpy
$ cd /usr/lib/python3/dist-packages
$ sudo rm -r numpy
installed the relevant numpy version
$ sudo pip install numpy==1.16.1
that's all.
I am setting up a new server for POSTGRESQL, so we have to migrate from ORACLE to POSTGRES while installing DBD-Oracle-1.76 package. However, we are getting error even though we have exported ORACLE_BASE, ORACLE_HOME, LD_LIBRARY, LD_LIBRARY_PATH.
Here is what I have tried:
make
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so \
-L/optware/oracle/12.2.0.1/client_1/lib -lclntsh -ldl -lm -lpthread -lnsl -lirc -limf -lirc -lrt -laio -lresolv -lsvml \
Here is the error:
/bin/ld: cannot find -laio
collect2: error: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1
Any ideas? Any help would be greatly appreciated!
If you're on Redhat/Fedora/RHEL/CentOS then try this before make:
sudo yum install libaio-devel
If Ubuntu (or Debian?) try:
sudo apt install libaio-dev
...or sudo apt-get install libaio libaio1 libaio-dev
I also needed:
export ORACLE_HOME=/wherever/oracle18-instantclient/instantclient_18_5
export LD_LIBRARY_PATH="$ORACLE_HOME:/usr/lib/x86_64-linux-gnu/"
Error while installing DBD::Oracle might be helpful.
I am trying to install nodejs from source. When I run 'make install' I am getting:
node-v6.3.1]# make install
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home/centos/node-v6.3.1/out'
g++ -I../deps/gtest -I../deps/gtest/include -pthread -Wall -Wextra -Wno-unused-parameter -m64 -Wno-missing-field-initializers -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /home/centos/node-v6.3.1/out/Release/.deps//home/centos/node-v6.3.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-death-test.o.d.raw -c -o /home/centos/node-v6.3.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-death-test.o ../deps/gtest/src/gtest-death-test.cc
In file included from ../deps/gtest/include/gtest/internal/gtest-internal.h:40:0,
from ../deps/gtest/include/gtest/internal/gtest-death-test-internal.h:40,
from ../deps/gtest/include/gtest/gtest-death-test.h:41,
from ../deps/gtest/src/gtest-death-test.cc:34:
../deps/gtest/include/gtest/internal/gtest-port.h:259:41: fatal error: ctype.h: No such file or directory
#include <ctype.h> // for isspace, etc
I installed c and c++ libraries as well using: yum -y install gcc gcc-c++ make.
I also tried to install via rpm:
error: %pre(nodejs-1:6.3.1-1nodesource.el7.centos.x86_64) scriptlet failed, exit status 127
Error in PREIN scriptlet in rpm package 1:nodejs-6.3.1-1nodesource.el7.centos.x8 6_64
Verifying : 1:nodejs-6.3.1-1nodesource.el7.centos.x86_64 1/1
Failed:
nodejs.x86_64 1:6.3.1-1nodesource.el7.centos
Could you please anyone help what might be the issue. Thanks
I'm trying to install touchegg,
Following is the error i'm getting while trying to use make command in su mode:
root#PG04954:/home/esrsank/Downloads/touchegg-1.1# make
g++ -m64 -Wl,-O1 -o touchegg Config.o GestureCollector.o GestureHandler.o
GestureFactory.o Gesture.o GestureTypeEnum.o GestureDirectionEnum.o
ActionTypeEnum.o ActionFactory.o MinimizeWindow.o CloseWindow.o
MaximizeRestoreWindow.o ShowDesktop.o SendKeys.o ChangeDesktop.o
ResizeWindow.o MoveWindow.o RunCommand.o DragAndDrop.o ChangeViewport.o
MouseClick.o Scroll.o WindowListener.o Main.o Touchegg.o moc_GestureCollector.o
moc_GestureHandler.o moc_GestureTypeEnum.o moc_GestureDirectionEnum.o
moc_ActionTypeEnum.o moc_WindowListener.o moc_Touchegg.o -
L/usr/lib/x86_64-linux-gnu -lutouch-geis -lX11 -lXtst -lXext -lQtXml -lQtGui
-lQtCore -lpthread
/usr/bin/ld: cannot find -lutouch-geis
collect2: ld returned 1 exit status
make: *** [touchegg] Error 1
Any Solutions?
It can't find libutouch-geis, either because it isn't installed or because the location of this library isn't in the linker path.
The instructions on this page suggest installing the following:
$ sudo apt-get install build-essential libqt4-dev utouch libgeis-dev libx11-6 libxtst-dev
then running:
$ qmake
$ make
$ sudo make install
Trying to get one of the samples compiled on Ubuntu 12.04
I’m using
make -f Makefile-x64-static
However, I get the error
make: gcc4: Command not found
I tried switching from gcc4 to gcc in the makefile.
However, I get the compile errors
note: #pragma message: IMPORTANT NOTE: The FBX SDK API changed substantially. Please define FBXSDK_NEW_API in your project and fix compilation errors as instructed in fbxsdk_compatibility.h.
And the link error
/usr/bin/ld: cannot find -luuid
Any tips would be appreciated.
Pre-requisites
sudo apt-get install uuid-dev
sudo apt-get install libxmu-dev libxi-dev
sudo apt-get install libx11-dev
Makefile modifications required
Change gcc4 to gcc
CC = gcc
LD = gcc
add -lX11 to LIBS
LIBS = -lfbxsdk-$(LIBFBXVERSION)$(STATIC) -lm -lrt -luuid -lc -lstdc++ -lpthread -ldl -lglut_gcc34-amd64 -lGLEW_amd64 -lGLU -lGL -lXmu -lX11
add -DFBXSDK_NEW_API to C_FLAGS and CXX_FLAGS
CFLAGS = -m64 -DFBXSDK_NEW_API
CXXFLAGS = -m64 -DFBXSDK_NEW_API