Install Soundfile Jetson Nano -- succeed and later fail

PREREQUISITES
HDF5, Archiconda3

Install HDF5
sudo apt-get install libhdf5-serial-dev hdf5-tools sudo apt-get install python3-pip

Install Archiconda
https://github.com/Archiconda/build-tools/releases/tag/0.2.3
Click on:
Archiconda3-0.2.3-Linux-aarch64.sh
It downloads to /Download folder
In terminal
cd Downloads ~/Downloads bash Archiconda3-0.2.3-Linux-aarch64.sh

[/home/gerardg/archiconda3] >>>
PREFIX=/home/gerardg/archiconda3
installing: python-3.7.1-h39be038_1002 …
Python 3.7.1
installing: ca-certificates-2018.03.07-0 …
installing: conda-env-2.6.0-1 …
installing: libgcc-ng-7.3.0-h5c90dd9_0 …
installing: libstdcxx-ng-7.3.0-h5c90dd9_0 …
installing: bzip2-1.0.6-h7b6447c_6 …
installing: libffi-3.2.1-h71b71f5_5 …
installing: ncurses-6.1-h71b71f5_0 …
installing: openssl-1.1.1a-h14c3975_1000 …
installing: xz-5.2.4-h7ce4240_4 …
installing: yaml-0.1.7-h7ce4240_3 …
installing: zlib-1.2.11-h7b6447c_2 …
installing: readline-7.0-h7ce4240_5 …
installing: tk-8.6.9-h84994c4_1000 …
installing: sqlite-3.26.0-h1a3e907_1000 …
installing: asn1crypto-0.24.0-py37_0 …
installing: certifi-2018.10.15-py37_0 …
installing: chardet-3.0.4-py37_1 …
installing: idna-2.7-py37_0 …
installing: pycosat-0.6.3-py37h7b6447c_0 …
installing: pycparser-2.19-py37_0 …
installing: pysocks-1.6.8-py37_0 …
installing: ruamel_yaml-0.15.64-py37h7b6447c_0 …
installing: six-1.11.0-py37_1 …
installing: cffi-1.11.5-py37hc365091_1 …
installing: setuptools-40.4.3-py37_0 …
installing: cryptography-2.5-py37h9d9f1b6_1 …
installing: wheel-0.32.1-py37_0 …
installing: pip-10.0.1-py37_0 …
installing: pyopenssl-18.0.0-py37_0 …
installing: urllib3-1.23-py37_0 …
installing: requests-2.19.1-py37_0 …
installing: conda-4.5.12-py37_0 …
installation finished.
Do you wish the installer to initialize Archiconda3
in your /home/gerardg/.bashrc ? [yes|no]
[no] >>> yes

Initializing Archiconda3 in /home/gerardg/.bashrc
A backup will be made to: /home/gerardg/.bashrc-archiconda3.bak

SUCCESSFULLY INSTALL SOUNDFILE
Install pysoundfile – name has been changed to soundfile:
$ git clone https://github.com/bastibe/SoundFile
Cloning into ‘SoundFile’…
remote: Enumerating objects: 2, done.
remote: Counting objects: 100% (2/2), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 1572 (delta 1), reused 0 (delta 0), pack-reused 1570
Receiving objects: 100% (1572/1572), 5.12 MiB | 4.47 MiB/s, done.
Resolving deltas: 100% (979/979), done.

Please note from above Archiconda3 install the following requirements are satisfied:
installing: libffi-3.2.1-h71b71f5_5 …
installing: cffi-1.11.5-py37hc365091_1 …
installing: pycparser-2.19-py37_0 …

$ pip3 install soundfile
Collecting soundfile
Downloading https://files.pythonhosted.org/packages/68/64/1191352221e2ec90db7492b4bf0c04fd9d2508de67b3f39cbf093cd6bd86/SoundFile-0.10.2-py2.py3-none-any.whl
Requirement already satisfied: cffi>=1.0 in ./archiconda3/lib/python3.7/site-packages (from soundfile) (1.11.5)
Requirement already satisfied: pycparser in ./archiconda3/lib/python3.7/site-packages (from cffi>=1.0->soundfile) (2.19)
Installing collected packages: soundfile
Successfully installed soundfile-0.10.2

START FRESH
I started over with a fresh install, installed pyTorch, repeated the above, and now when I attempt to install soundfile I fail.

FAILURE TO INSTALL SOUNDFILE
$ git clone https://github.com/bastibe/SoundFile
Cloning into ‘SoundFile’…
remote: Enumerating objects: 2, done.
remote: Counting objects: 100% (2/2), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 1572 (delta 1), reused 0 (delta 0), pack-reused 1570
Receiving objects: 100% (1572/1572), 5.12 MiB | 3.44 MiB/s, done.
Resolving deltas: 100% (979/979), done.

$ pip3 install soundfile
Collecting soundfile
Using cached https://files.pythonhosted.org/packages/68/64/1191352221e2ec90db7492b4bf0c04fd9d2508de67b3f39cbf093cd6bd86/SoundFile-0.10.2-py2.py3-none-any.whl
Collecting cffi>=1.0 (from soundfile)
Using cached https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz
Collecting pycparser (from cffi>=1.0->soundfile)
Building wheels for collected packages: cffi
Running setup.py bdist_wheel for cffi … error
Complete output from command /usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-nd13l1kd/cffi/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d /tmp/tmpp92h6l1ipip-wheel- --python-tag cp36:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.6
creating build/lib.linux-aarch64-3.6/cffi
copying cffi/ffiplatform.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/vengine_gen.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/verifier.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/pkgconfig.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/recompiler.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/api.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/cparser.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/init.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/error.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/lock.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/model.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/commontypes.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/_cffi_include.h -> build/lib.linux-aarch64-3.6/cffi
copying cffi/parse_c_type.h -> build/lib.linux-aarch64-3.6/cffi
copying cffi/_embedding.h -> build/lib.linux-aarch64-3.6/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-aarch64-3.6/cffi
running build_ext
building ‘_cffi_backend’ extension
creating build/temp.linux-aarch64-3.6
creating build/temp.linux-aarch64-3.6/c
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 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.6m -c c/_cffi_backend.c -o build/temp.linux-aarch64-3.6/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^~~~~~~
compilation terminated.
error: command ‘aarch64-linux-gnu-gcc’ failed with exit status 1

How do I resolve this Error message?
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found

Or is the Success from Downloading and Failure from using cached?
If so how can I clear cache?

1 Like