Has anyone successfully installed scikit-learn on Jetson Xavier?
was getting this error:
error: Command β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 -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.6m -c sklearn/neighbors/quad_tree.c -o build/temp.linux-aarch64-3.6/sklearn/neighbors/quad_tree.o -MMD -MF build/temp.linux-aarch64-3.6/sklearn/neighbors/quad_tree.o.dβ failed with exit status 1
----------------------------------------
Command β/usr/bin/python3 -u -c βimport setuptools, tokenize;file=β/tmp/pip-build-iec45mu7/scikit-learn/setup.pyβ;f=getattr(tokenize, βopenβ, open)(file);code=f.read().replace(β\r\nβ, β\nβ);f.close();exec(compile(code, file, βexecβ))β install --record /tmp/pip-n_3crfi4-record/install-record.txt --single-version-externally-managed --compileβ failed with error code 1 in /tmp/pip-build-iec45mu7/scikit-learn/
something in the following made it work:
pip3 install --upgrade setuptools
sudo pip3 install -U setuptools
sudo apt-get install libpcap-dev libpq-dev
sudo pip3 install cython
finally!:
sudo pip3 install git+https://github.com/scikit-learn/scikit-learn.git
Thanks for the sharing.
Can this method be followed for Jetson TX2 board?
Hi,
I think it should work.
I was able to install on Jetson TX1 using the same steps.
Cheers,
Ritvik
Hi,
I tried on a Jetson nano β¦ it failed.
Any idea how to install scikit-learn on a nano ?
Many thanks for your help β¦
Gilles
Hi,
Please check this topic for the installation scikit-learn on Jetson Nano:
[url]https://devtalk.nvidia.com/default/topic/1049684/jetson-nano/errors-during-install-sklearn-/[/url]
Thanks.
Hi,
I use jetson tx2 with jetpack 4.2
I got the following errors trying to install sklearn with the above commands:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-86rk0ntw/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i Simple index β wheel setuptools βCython>=0.29.13β βnumpy==1.13.3; python_version==ββ'ββ3.5ββ'ββ and platform_system!=β"βββAIXβββ"ββ βnumpy==1.13.3; python_version==ββ'ββ3.6ββ'ββ and platform_system!=β"βββAIXβββ"ββ βnumpy==1.14.5; python_version==ββ'ββ3.7ββ'ββ and platform_system!=β"βββAIXβββ"ββ βnumpy==1.17.3; python_version>=ββ'ββ3.8ββ'ββ and platform_system!=β"βββAIXβββ"ββ βnumpy==1.16.0; python_version==ββ'ββ3.5ββ'ββ and platform_system==β"βββAIXβββ"ββ βnumpy==1.16.0; python_version==ββ'ββ3.6ββ'ββ and platform_system==β"βββAIXβββ"ββ βnumpy==1.16.0; python_version==ββ'ββ3.7ββ'ββ and platform_system==β"βββAIXβββ"ββ βnumpy==1.17.3; python_version>=ββ'ββ3.8ββ'ββ and platform_system==β"βββAIXβββ"ββ
cwd: None
Complete output (39 lines):
Traceback (most recent call last):
File β/usr/lib/python3.6/runpy.pyβ, line 193, in _run_module_as_main
βmainβ, mod_spec)
File β/usr/lib/python3.6/runpy.pyβ, line 85, in _run_code
exec(code, run_globals)
File β/usr/local/lib/python3.6/dist-packages/pip/main.pyβ, line 16, in
from pip._internal.main import main as _main # isort:skip # noqa
File β/usr/local/lib/python3.6/dist-packages/pip/_internal/main.pyβ, line 8, in
import locale
File β/usr/lib/python3.6/locale.pyβ, line 16, in
import re
File β/usr/lib/python3.6/re.pyβ, line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module βenumβ has no attribute βIntFlagβ
Error in sys.excepthook:
Traceback (most recent call last):
File β/usr/lib/python3/dist-packages/apport_python_hook.pyβ, line 53, in apport_excepthook
if not enabled():
File β/usr/lib/python3/dist-packages/apport_python_hook.pyβ, line 24, in enabled
import re
File β/usr/lib/python3.6/re.pyβ, line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module βenumβ has no attribute βIntFlagβ
Original exception was:
Traceback (most recent call last):
File β/usr/lib/python3.6/runpy.pyβ, line 193, in _run_module_as_main
βmainβ, mod_spec)
File β/usr/lib/python3.6/runpy.pyβ, line 85, in _run_code
exec(code, run_globals)
File β/usr/local/lib/python3.6/dist-packages/pip/main.pyβ, line 16, in
from pip._internal.main import main as _main # isort:skip # noqa
File β/usr/local/lib/python3.6/dist-packages/pip/_internal/main.pyβ, line 8, in
import locale
File β/usr/lib/python3.6/locale.pyβ, line 16, in
import re
File β/usr/lib/python3.6/re.pyβ, line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module βenumβ has no attribute βIntFlagβ
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-86rk0ntw/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i Simple index β wheel setuptools βCython>=0.29.13β βnumpy==1.13.3; python_version==ββ'ββ3.5ββ'ββ and platform_system!=β"βββAIXβββ"ββ βnumpy==1.13.3; python_version==ββ'ββ3.6ββ'ββ and platform_system!=β"βββAIXβββ"ββ βnumpy==1.14.5; python_version==ββ'ββ3.7ββ'ββ and platform_system!=β"βββAIXβββ"ββ βnumpy==1.17.3; python_version>=ββ'ββ3.8ββ'ββ and platform_system!=β"βββAIXβββ"ββ βnumpy==1.16.0; python_version==ββ'ββ3.5ββ'ββ and platform_system==β"βββAIXβββ"ββ βnumpy==1.16.0; python_version==ββ'ββ3.6ββ'ββ and platform_system==β"βββAIXβββ"ββ βnumpy==1.16.0; python_version==ββ'ββ3.7ββ'ββ and platform_system==β"βββAIXβββ"ββ βnumpy==1.17.3; python_version>=ββ'ββ3.8ββ'ββ and platform_system==β"βββAIXβββ"ββ Check the logs for full command output.
The same error on my side - it doesnβt helped when Iβve uninstalled enum34
Any help appreciated