TL;DR:
- I want to run Numpy and Pytorch on Debian 9
- I installed Python 3.8.17, installed virtualenv, created a virtual environment, and attempted to install Numpy on it
- However, the install takes forever and eventually gets stuck.
Full Explanation:
My ultimate goal is to set up a Python environment on Debian 9 so that I can run a PyTorch model on it, which from documentation seems to require Python 3.8 or above.
By default, Debian 9 comes with Python 3.5 which isn't sufficient. Thus, I installed Python 3.8.17 as outlined in this blog (https://tecadmin.net/how-to-install-python-3-9-on-debian-9/) and confirmed that it works:
python3.8 -V // Python 3.8.17
pip3.8 -V //
Then, I used pip3.8 to install virtualenv and created a virtual environment to attempt to install Numpy using the command:
pip3.8 -v install numpy==1.24.4 --no-cache-dir
I've waited for 2 hours and it's been stuck with this message:
Using pip 23.1.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
Link requires a different Python (3.8.17 not in: '>=3.9'): https://files.pythonhosted.org/packages/26/de/437a60a69f7fd0c79264530a97787b2ac7394616e366123620s-python:>=3.9)
Link requires a different Python (3.8.17 not in: '>=3.9'): https://files.pythonhosted.org/packages/d0/b2/fe774844d1857804cc884bba67bec38f649c99d0dc1ee7cbbfython:>=3.9)
Collecting numpy==1.24.4
Downloading numpy-1.24.4.tar.gz (10.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.9/10.9 MB 2.0 MB/s eta 0:00:00
Running command pip subprocess to install build dependencies
Collecting setuptools==59.2.0
Using cached setuptools-59.2.0-py3-none-any.whl (952 kB)
Collecting wheel==0.37.0
Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Collecting Cython<3.0,>=0.29.30
Using cached Cython-0.29.35-py2.py3-none-any.whl (988 kB)
Installing collected packages: wheel, setuptools, Cython
Successfully installed Cython-0.29.35 setuptools-59.2.0 wheel-0.37.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to us
Installing build dependencies ... done
Running command Getting requirements to build wheel
running egg_info
running build_src
INFO: build_src
creating numpy.egg-info
writing numpy.egg-info/PKG-INFO
writing dependency_links to numpy.egg-info/dependency_links.txt
writing entry points to numpy.egg-info/entry_points.txt
writing top-level names to numpy.egg-info/top_level.txt
writing manifest file 'numpy.egg-info/SOURCES.txt'
reading manifest file 'numpy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'LICENSES_bundled.txt'
warning: no previously-included files found matching 'azure-*.yml'
no previously-included directories found matching 'doc/build'
no previously-included directories found matching 'doc/source/generated'
no previously-included directories found matching 'benchmarks/env'
no previously-included directories found matching 'benchmarks/results'
no previously-included directories found matching 'benchmarks/html'
no previously-included directories found matching 'benchmarks/numpy'
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.swp' found anywhere in distribution
warning: no previously-included files matching '*.bak' found anywhere in distribution
warning: no previously-included files matching '*~' found anywhere in distribution
adding license file 'LICENSE.txt'
writing manifest file 'numpy.egg-info/SOURCES.txt'
Running from numpy source directory.
...
creating build/temp.linux-armv7l-3.8
creating build/temp.linux-armv7l-3.8/numpy
creating build/temp.linux-armv7l-3.8/numpy/core
creating build/temp.linux-armv7l-3.8/numpy/core/src
creating build/temp.linux-armv7l-3.8/numpy/core/src/npymath
creating build/temp.linux-armv7l-3.8/build
creating build/temp.linux-armv7l-3.8/build/src.linux-armv7l-3.8
creating build/temp.linux-armv7l-3.8/build/src.linux-armv7l-3.8/numpy
creating build/temp.linux-armv7l-3.8/build/src.linux-armv7l-3.8/numpy/core
creating build/temp.linux-armv7l-3.8/build/src.linux-armv7l-3.8/numpy/core/src
creating build/temp.linux-armv7l-3.8/build/src.linux-armv7l-3.8/numpy/core/src/npymath
INFO: compile options: '-Ibuild/src.linux-armv7l-3.8/numpy/core/src/npymath -Inumpy/core/include -Ibuild/src.linux-armv7l-3.8/numpy/core/include/numpy -Ibu/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/usr/locsrc.linux-armv7l-3.8/numpy/core/src/npymath -c'
INFO: gcc: numpy/core/src/npymath/npy_math.c
INFO: gcc: build/src.linux-armv7l-3.8/numpy/core/src/npymath/ieee754.c
INFO: gcc: build/src.linux-armv7l-3.8/numpy/core/src/npymath/npy_math_complex.c
INFO: gcc: numpy/core/src/npymath/halffloat.c
INFO: ar: adding 4 object files to build/temp.linux-armv7l-3.8/libnpymath.a
INFO: building 'npyrandom' library
INFO: compiling C sources
INFO: C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
creating build/temp.linux-armv7l-3.8/numpy/random
creating build/temp.linux-armv7l-3.8/numpy/random/src
creating build/temp.linux-armv7l-3.8/numpy/random/src/distributions
INFO: compile options: '-Inumpy/core/include -Ibuild/src.linux-armv7l-3.8/numpy/core/include/numpy -Ibuild/src.linux-armv7l-3.8/numpy/distutils/include -Inmpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/usr/local/include/python3.8 -Ibuild/src.linux-armv7l-3.8/nu
extra options: '-std=c99'
INFO: gcc: numpy/random/src/distributions/logfactorial.c
INFO: gcc: numpy/random/src/distributions/distributions.c
INFO: gcc: numpy/random/src/distributions/random_mvhg_count.c
INFO: gcc: numpy/random/src/distributions/random_mvhg_marginals.c
INFO: gcc: numpy/random/src/distributions/random_hypergeometric.c
INFO: ar: adding 5 object files to build/temp.linux-armv7l-3.8/libnpyrandom.a
running build_ext
INFO: customize UnixCCompiler
INFO: customize UnixCCompiler using new_build_ext
INFO: CCompilerOpt.__init__[834] : hit the memory cache
INFO: CCompilerOpt.generate_dispatch_header[2357] : generate CPU dispatch header: (build/src.linux-armv7l-3.8/numpy/distutils/include/npy_cpu_dispatch_conf
INFO: customize UnixCCompiler
INFO: customize UnixCCompiler using new_build_ext
INFO: building 'numpy.core._multiarray_tests' extension
INFO: compiling C sources
INFO: C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
creating build/temp.linux-armv7l-3.8/build/src.linux-armv7l-3.8/numpy/core/src/multiarray
creating build/temp.linux-armv7l-3.8/numpy/core/src/common
INFO: compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/incl7l-3.8/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/um.8 -Ibuild/src.linux-armv7l-3.8/numpy/core/src/common -Ibuild/src.linux-armv7l-3.8/numpy/core/src/npymath -c'
INFO: gcc: build/src.linux-armv7l-3.8/numpy/core/src/multiarray/_multiarray_tests.c
numpy/core/src/multiarray/_multiarray_tests.c.src: In function ‘array_solve_diophantine’:
numpy/core/src/multiarray/_multiarray_tests.c.src:1439:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (PyTuple_GET_SIZE(U) != nterms) {
^~
INFO: gcc: numpy/core/src/common/mem_overlap.c
INFO: gcc: numpy/core/src/common/npy_argparse.c
INFO: gcc: numpy/core/src/common/npy_hashtable.c
INFO: gcc -pthread -shared build/temp.linux-armv7l-3.8/build/src.linux-armv7l-3.8/numpy/core/src/multiarray/_multiarray_tests.o build/temp.linux-armv7l-3.8common/npy_argparse.o build/temp.linux-armv7l-3.8/numpy/core/src/common/npy_hashtable.o -Lbuild/temp.linux-armv7l-3.8 -lnpymath -o build/lib.linux-armv7l-3.8
INFO: building 'numpy.core._multiarray_umath' extension
INFO: compiling C++ dispatch-able sources
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> numpy/core/src/npysort/x86-qsort.dispatch.cpp
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (AVX512_SKX) not part of baseline or dispatch-able features
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'KEEP_BASELINE' is ON
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'MAXOPT' is ON
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/npysort/x86-qsort.dispatch.h
INFO: compiling C dispatch-able sources
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> build/src.linux-armv7l-3.8/numpy/core/src/multiarray/argfunc.dispatch.c
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (VX XOP VXE VSX2 AVX512_SKX AVX2 ASIMD SSE42 SSE2) not part of baseline or dispatch-able featu
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'MAXOPT' is ON
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/multiarray/argfunc.dispatch.h
INFO: CCompilerOpt._wrap_target[2553] : wrap dispatch-able target -> build/src.linux-armv7l-3.8/numpy/core/src/multiarray/argfunc.dispatch.neon.c
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_unary_fp.dispatch.c
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (VX VXE VSX2 SSE41 ASIMD SSE2) not part of baseline or dispatch-able features
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'MAXOPT' is ON
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_unary_fp.dispatch.h
INFO: CCompilerOpt._wrap_target[2553] : wrap dispatch-able target -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_unary_fp.dispatch.neon.c
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_arithm_fp.dispatch.c
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (VXE VX AVX512F AVX2 SSE2) not part of baseline or dispatch-able features
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'MAXOPT' is ON
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_arithm_fp.dispatch.h
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_arithmetic.dispatch.c
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (VX AVX512F VSX2 AVX512_SKX SSE41 VSX4 AVX2 SSE2) not part of baseline or dispatch-able featur
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'MAXOPT' is ON
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_arithmetic.dispatch.h
INFO: CCompilerOpt._wrap_target[2553] : wrap dispatch-able target -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_arithmetic.dispatch.neon.c
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_minmax.dispatch.c
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (VX VXE VSX2 AVX512_SKX AVX2 ASIMD SSE2) not part of baseline or dispatch-able features
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'MAXOPT' is ON
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_minmax.dispatch.h
INFO: CCompilerOpt._wrap_target[2553] : wrap dispatch-able target -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_minmax.dispatch.neon.c
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_trigonometric.dispatch.c
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (VXE2 (FMA3 AVX2) VXE VSX3 AVX512F VSX2 VSX4) not part of baseline or dispatch-able features
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'MAXOPT' is ON
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_trigonometric.dispatch.h
INFO: CCompilerOpt._wrap_target[2553] : wrap dispatch-able target -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_trigonometric.dispatch.neon_vfp
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_umath_fp.dispatch.c
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (AVX512_SKX) not part of baseline or dispatch-able features
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'MAXOPT' is ON
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_umath_fp.dispatch.h
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_exponent_log.dispatch.c
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (AVX512_SKX (FMA3 AVX2) AVX512F) not part of baseline or dispatch-able features
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'MAXOPT' is ON
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_exponent_log.dispatch.h
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_hyperbolic.dispatch.c
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets ((FMA3 AVX2) VX VXE VSX2 AVX512_SKX VSX4) not part of baseline or dispatch-able features
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'MAXOPT' is ON
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_hyperbolic.dispatch.h
INFO: CCompilerOpt._wrap_target[2553] : wrap dispatch-able target -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_hyperbolic.dispatch.neon_vfpv4.
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_modulo.dispatch.c
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (VSX4) not part of baseline or dispatch-able features
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_modulo.dispatch.h
INFO: CCompilerOpt.parse_targets[1853] : looking for '@targets' inside -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_comparison.dispatch.c
INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (VX VSX3 VXE AVX512F VSX2 AVX512_SKX AVX2 SSE42 SSE2) not part of baseline or dispatch-able fe
INFO: CCompilerOpt._parse_target_tokens[2048] : policy 'MAXOPT' is ON
INFO: CCompilerOpt._generate_config[2593] : generate dispatched config -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_comparison.dispatch.h
INFO: CCompilerOpt._wrap_target[2553] : wrap dispatch-able target -> build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_comparison.dispatch.neon.c
INFO: C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
creating build/temp.linux-armv7l-3.8/build/src.linux-armv7l-3.8/numpy/core/src/umath
INFO: compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild/src.linuxc/common -Ibuild/src.linux-armv7l-3.8/numpy/core/src/umath -Inumpy/core/include -Ibuild/src.linux-armv7l-3.8/numpy/core/include/numpy -Ibuild/src.linux-armv7t -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort .8/numpy/core/src/common -Ibuild/src.linux-armv7l-3.8/numpy/core/src/npymath -c'
extra options: '-O3 -mfpu=neon'
INFO: gcc: build/src.linux-armv7l-3.8/numpy/core/src/multiarray/argfunc.dispatch.neon.c
In file included from build/src.linux-armv7l-3.8/numpy/core/src/multiarray/argfunc.dispatch.neon.c:8:0:
numpy/core/src/multiarray/argfunc.dispatch.c.src: In function ‘simd_argmax_u32’:
numpy/core/src/multiarray/argfunc.dispatch.c.src:151:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len0 > NPY_MAX_UINT32) {
^
In file included from build/src.linux-armv7l-3.8/numpy/core/src/multiarray/argfunc.dispatch.neon.c:8:0:
numpy/core/src/multiarray/argfunc.dispatch.c.src: In function ‘simd_argmin_u32’:
numpy/core/src/multiarray/argfunc.dispatch.c.src:151:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len0 > NPY_MAX_UINT32) {
^
In file included from build/src.linux-armv7l-3.8/numpy/core/src/multiarray/argfunc.dispatch.neon.c:8:0:
numpy/core/src/multiarray/argfunc.dispatch.c.src: In function ‘simd_argmax_s32’:
numpy/core/src/multiarray/argfunc.dispatch.c.src:151:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len0 > NPY_MAX_UINT32) {
^
In file included from build/src.linux-armv7l-3.8/numpy/core/src/multiarray/argfunc.dispatch.neon.c:8:0:
numpy/core/src/multiarray/argfunc.dispatch.c.src: In function ‘simd_argmin_s32’:
numpy/core/src/multiarray/argfunc.dispatch.c.src:151:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len0 > NPY_MAX_UINT32) {
^
In file included from build/src.linux-armv7l-3.8/numpy/core/src/multiarray/argfunc.dispatch.neon.c:8:0:
numpy/core/src/multiarray/argfunc.dispatch.c.src: In function ‘simd_argmax_f32’:
numpy/core/src/multiarray/argfunc.dispatch.c.src:151:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len0 > NPY_MAX_UINT32) {
^
In file included from build/src.linux-armv7l-3.8/numpy/core/src/multiarray/argfunc.dispatch.neon.c:8:0:
numpy/core/src/multiarray/argfunc.dispatch.c.src: In function ‘simd_argmin_f32’:
numpy/core/src/multiarray/argfunc.dispatch.c.src:151:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len0 > NPY_MAX_UINT32) {
^
INFO: gcc: build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_unary_fp.dispatch.neon.c
INFO: gcc: build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_arithmetic.dispatch.neon.c
INFO: gcc: build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_minmax.dispatch.neon.c
INFO: gcc: build/src.linux-armv7l-3.8/numpy/core/src/umath/loops_comparison.dispatch.neon.c
Since it can't even install Numpy properly (which is only ~35MB), PyTorch will for sure be an issue (which can be up to 1GB). What approach can I take to install these two packages properly on my machine? Or what am I doing wrong?
My hardware has limited memory and disk space, is it just inherently impossible to utilize PyTorch on this hardware?
Thanks in advance
Hardware Specifications: Linux Command: lshw -short
TI AM335x BeagleBone Black 512MB DDR3 RAM, 4GB 8-bit eMMC on-board flash storage
Linux Command: lscpu
Architecture: armv71
CPU(s): 1
Model Name: ARMv7 Processor rev 2 (v71)
Linux Command: cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian