Installing MXNet framework. on Raspberry Pi - SciPy hanging - scipy

I'm attempting to setup AWS Greengrass with mxnet for Machine Learning on a Raspberry Pi.
When running ./mxnet_installer.sh from https://docs.aws.amazon.com/greengrass/latest/developerguide/ml-console.html#install-mxnet it takes ages and just disconnects my session with PuTTY.
It seems to be hanging on Running setup.py bdist_wheel for scipy - it sits there for about 2 hours before the PuTTY session is lost.
I'm executing the command on a clean PI, all all that has been done beforehand is modules 1 to 6 from https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-gs.html
login as: pi
pi#192.168.0.49's password:
Linux raspberrypi 4.14.70-v7+ #1144 SMP Tue Sep 18 17:34:46 BST 2018 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Oct 2 14:53:14 2018 from 192.168.0.13
SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
pi#raspberrypi:~ $ ls
aws-greengrass-samples ggc-mxnet-v1.2.1-python-raspi.tar.gz
ggc-mxnet-v1.2.1-python-raspi
pi#raspberrypi:~ $ cd ggc-mxnet-v1.2.1-python-raspi/
pi#raspberrypi:~/ggc-mxnet-v1.2.1-python-raspi $ ls
greengrass-ml-squeezenet-object-classification-raspi-python.tar.gz
mxnet-1.2.1-py2.py3-none-any.whl
mxnet_examples.tar.gz
mxnet_installer.sh
mxnet-python-unit-test.tar.gz
pi#raspberrypi:~/ggc-mxnet-v1.2.1-python-raspi $ ./mxnet_installer.sh
Starting MXNET installation on the system...
Unittests: N
Swapfile location: /var/swap
Swapfile size: 1 GB
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
python-numpy-dbg python-numpy-doc
The following NEW packages will be installed:
python-numpy
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,694 kB of archives.
After this operation, 9,532 kB of additional disk space will be used.
Selecting previously unselected package python-numpy.
(Reading database ... 43734 files and directories currently installed.)
Preparing to unpack .../python-numpy_1%3a1.12.1-3_armhf.deb ...
Unpacking python-numpy (1:1.12.1-3) ...
Setting up python-numpy (1:1.12.1-3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
liblapack3 is already the newest version (3.7.0-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libopenblas-dev is already the newest version (0.2.19-3+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
liblapack-dev is already the newest version (3.7.0-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-dev is already the newest version (2.7.13-2).
python-nose is already the newest version (1.3.7-2).
python-pip is already the newest version (9.0.1-2+rpt2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-opencv is already the newest version (2.4.9.1+dfsg1-2).
zip is already the newest version (3.0-11).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
dpkg: python-numpy: dependency problems, but removing anyway as you requested:
python-opencv depends on python-numpy-abi9; however:
Package python-numpy-abi9 is not installed.
Package python-numpy which provides python-numpy-abi9 is to be removed.
python-opencv depends on python-numpy (>= 1:1.6.1); however:
Package python-numpy is to be removed.
python-picamera depends on python-numpy.
python-opencv depends on python-numpy-abi9; however:
Package python-numpy-abi9 is not installed.
Package python-numpy which provides python-numpy-abi9 is to be removed.
python-opencv depends on python-numpy (>= 1:1.6.1); however:
Package python-numpy is to be removed.
(Reading database ... 44120 files and directories currently installed.)
Removing python-numpy (1:1.12.1-3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages (18.0)
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: wheel in /usr/lib/python2.7/dist-packages (0.29.0)
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: picamera in /usr/lib/python2.7/dist-packages (1.13)
Checking numpy...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: numpy in /usr/local/lib/python2.7/dist-packages (1.15.2)
'numpy' check complete!
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting scipy
Using cached https://files.pythonhosted.org/packages/07/76/7e844757b9f3bf5ab9f951ccd3e4a8eed91ab8720b0aac8c2adcc2fdae9f/scipy-1.1.0.tar.gz
Building wheels for collected packages: scipy
Running setup.py bdist_wheel for scipy ... |
Any suggestions?

Increase swap space.
Install SciPy manually. Build from sources. See
this answer
Run mxnet_installer

Related

Issues with "`GLIBC_2.32' and `GLIBC_2.34' not found" when Installing Coursier as per Scala 'getting Started' Official Instructions

What I am trying to do:
I want to get started with Scala, as per https://docs.scala-lang.org/getting-started/index.html.
curl -fL https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup
The error I am getting:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 20.1M 100 20.1M 0 0 19.0M 0 0:00:01 0:00:01 --:--:-- 19.0M
./cs: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./cs)
./cs: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./cs)
OS, Java and LDD
Operating System (dual boot with Windows):
Ubuntu 20.04.5 LTS
Output of ldd --version:
ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
JAVA (output of java --version)
openjdk 11.0.17 2022-10-18
OpenJDK Runtime Environment (build 11.0.17+8-post-Ubuntu-1ubuntu220.04)
OpenJDK 64-Bit Server VM (build 11.0.17+8-post-Ubuntu-1ubuntu220.04, mixed mode, sharing)
Things I have tried:
sudo apt --fix-broken install
gives me
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 75 not upgraded.
sudo apt install -y libc6 libc-bin
gives me
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc-bin is already the newest version (2.31-0ubuntu9.9).
libc-bin set to manually installed.
libc6 is already the newest version (2.31-0ubuntu9.9).
0 upgraded, 0 newly installed, 0 to remove and 75 not upgraded.
Ultimately, I downloaded the deb from https://launchpad.net/ubuntu/groovy/amd64/libc6/2.32-0ubuntu2. When I run sudo dpkg -i libc6_2.32-0ubuntu2_amd64.deb I get:
dpkg: regarding libc6_2.32-0ubuntu2_amd64.deb containing libc6:amd64:
libc6:amd64 breaks locales (<< 2.32)
locales (version 2.31-0ubuntu9.9) is present and installed.
dpkg: error processing archive libc6_2.32-0ubuntu2_amd64.deb (--install):
installing libc6:amd64 would break locales, and
deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
libc6_2.32-0ubuntu2_amd64.deb
Otherwise, if I try to force it i.e.
sudo dpkg --force-all i libc6_2.32-0ubuntu2_amd64.deb, I get:
dpkg: error: need an action option
Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
You may try the static compiled version of the cs:
https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux-static.gz
At least in my setup this worked.
It's already an issue on their Github, which was closed 19 hours ago and will be fixed in the next release

No way to update python3.10 on my linux mint mate 20.3 Una

Last night the update manager indicates there are 2 update ready. I want to apply them but at the end only one updates the 2nd one (python 3.10) does not. It was late so went to bed. This morning that update is still there but now there is some more stuff.
Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386'
It was not exactly the same as mine related to codelite. I looked in repositories and ppa´s and found an entry for codelite and disabled it. That message was gone. But the update still did not work. This time a problem with the mirror I was using. Changed mirror and all the rest runs fine. Still updating python 3.10 no way. Other updates do pass, even python 3.8 and 3.9. Clearly the problem lies with python 3.10 and seem dependency related but I am stumped.
The deadsnakes repository is there. I removed and reinstalled it. Still same problem.
Here is a screen shoot of my terminal (same messages appear when I use synaptic):
It all turn around two dependencies that python 3.10 needs but are no longer there. But the recommended commands do nothing but return the same result.
The following packages have unmet dependencies.
python3.10 : Depends: libpython3.10-stdlib (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
python3.10-minimal : Depends: libpython3.10-minimal (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
So what is going wrong? what apart from focal1 and focal2 is different? And are they fundamentally different? Most importantly how do I solve this problem without going in circles.
Oh and before I forget. My python console in gedit stopped working at the same time as these problems started and I can't make out what the problem there is either. Suspect though they are related. e
Thank you in advance.
Here is how I solved the same issue in Ubuntu 20.04
Locate package libpython3.10-stdlib
$ apt-cache policy libpython3.10-stdlib
libpython3.10-stdlib:
Installed: 3.10.4-1+focal1
Candidate: 3.10.4-1+focal2
Version table:
3.10.4-1+focal2 500
500 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal/main amd64 Packages
*** 3.10.4-1+focal1 100
100 /var/lib/dpkg/status
$ ls -l /var/lib/dpkg/info | grep -i libpython3.10-stdlib
-rw-r--r-- 1 root root 14489 Apr 10 00:26 libpython3.10- stdlib:amd64.list
-rw-r--r-- 1 root root 23536 Mär 24 17:12 libpython3.10-stdlib:amd64.md5sums
-rwxr-xr-x 1 root root 1161 Mär 24 17:12 libpython3.10-stdlib:amd64.prerm
Remove manually the package
$ sudo mv /var/lib/dpkg/info/libpython3.10-stdlib:amd64.* /tmp
Repeat the same steps for libpython3.10-minimal. Then fix the broken packages
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libpython3.10-minimal libpython3.10-stdlib
The following packages will be upgraded:
libpython3.10-minimal libpython3.10-stdlib
2 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
5 not fully installed or removed.
Need to get 0 B/2.566 kB of archives.
After this operation, 68,6 kB disk space will be freed.
Do you want to continue? [Y/n]
dpkg: warning: files list file for package 'libpython3.10-stdlib:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpython3.10-minimal:amd64' missing; assuming package has no files currently installed
(Reading database ... 191581 files and directories currently installed.)
Preparing to unpack .../libpython3.10-stdlib_3.10.4-1+focal2_amd64.deb ...
Unpacking libpython3.10-stdlib:amd64 (3.10.4-1+focal2) over (3.10.4-1+focal1) ...
Preparing to unpack .../libpython3.10-minimal_3.10.4-1+focal2_amd64.deb ...
Unpacking libpython3.10-minimal:amd64 (3.10.4-1+focal2) over (3.10.4-1+focal1) ...
Setting up libpython3.10-minimal:amd64 (3.10.4-1+focal2) ...
Setting up python3.10-minimal (3.10.4-1+focal2) ...
Setting up libpython3.10-stdlib:amd64 (3.10.4-1+focal2) ...
Setting up libpython3.10:amd64 (3.10.4-1+focal2) ...
Setting up python3.10 (3.10.4-1+focal2) ...
Setting up libpython3.10-dev:amd64 (3.10.4-1+focal2) ...
Setting up python3.10-dev (3.10.4-1+focal2) ...
I had the same error. I followed the instructions in the first and second answer and I got this:
/var/cache/apt/archives/libpython3.10-stdlib_3.10.4-1+focal2_amd64.debE: Sub-process /usr/bin/dpkg returned an error code (1)
After move this :
sudo mv /var/cache/apt/archives/libpython3.10-stdlib_3.10.4-1+focal2_amd64.deb /tmp
It works !
Same thing happened to me. When apt fails I go for https://pkgs.org/, search the package, download and install manually. It usually works.

Emacs updating with the same package

I am using Ubuntu 16.04.1 LTS. I had installed GNU Emacs 26.0.50.2 Copyright (C) 2017 Free Software Foundation, Inc. from the repository ubuntu-elisp/ppa. Now everytime I boot up I get the same update of about 36.7MB for emacs-snapshot emacs-snapshot-common emacs-snapshot-el. I am not sure if they are ignoring the updates earlier installed or whether they were not installed. But the upgrade does not give any errors.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
emacs-snapshot emacs-snapshot-common emacs-snapshot-el
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 36.7 MB of archives.
After this operation, 85.0 kB disk space will be freed.
Get:1 http://ppa.launchpad.net/ubuntu-elisp/ppa/ubuntu xenial/main amd64 emacs-snapshot-el all 20170210:93105-26187a3-emacs-25.1~ubuntu16.04.1 [15.6 MB]
Get:2 http://ppa.launchpad.net/ubuntu-elisp/ppa/ubuntu xenial/main amd64 emacs-snapshot amd64 20170210:93105-26187a3-emacs-25.1~ubuntu16.04.1 [3,878 kB]
Get:3 http://ppa.launchpad.net/ubuntu-elisp/ppa/ubuntu xenial/main amd64 emacs-snapshot-common all 20170210:93105-26187a3-emacs-25.1~ubuntu16.04.1 [17.2 MB]
Fetched 36.7 MB in 27s (1,351 kB/s)
(Reading database ... 367153 files and directories currently installed.)
Preparing to unpack .../emacs-snapshot-el_20170210%3a93105-26187a3-emacs-25.1~ubuntu16.04.1_all.deb ...
Unpacking emacs-snapshot-el (20170210:93105-26187a3-emacs-25.1~ubuntu16.04.1) over (20170209:93097-d825d1f-emacs-25.1~ubuntu16.04.1) ...
Preparing to unpack .../emacs-snapshot_20170210%3a93105-26187a3-emacs-25.1~ubuntu16.04.1_amd64.deb ...
Unpacking emacs-snapshot (20170210:93105-26187a3-emacs-25.1~ubuntu16.04.1) over (20170209:93097-d825d1f-emacs-25.1~ubuntu16.04.1) ...
Preparing to unpack .../emacs-snapshot-common_20170210%3a93105-26187a3-emacs-25.1~ubuntu16.04.1_all.deb ...
Unpacking emacs-snapshot-common (20170210:93105-26187a3-emacs-25.1~ubuntu16.04.1) over (20170209:93097-d825d1f-emacs-25.1~ubuntu16.04.1) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
install-info: warning: no info dir entry in `/usr/share/info/gnash_ref.info.gz'
install-info: warning: no info dir entry in `/usr/share/info/gnash_user.info.gz'
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up emacs-snapshot-common (20170210:93105-26187a3-emacs-25.1~ubuntu16.04.1) ...
Setting up emacs-snapshot-el (20170210:93105-26187a3-emacs-25.1~ubuntu16.04.1) ...
Setting up emacs-snapshot (20170210:93105-26187a3-emacs-25.1~ubuntu16.04.1) ...
Edit:(missed out the question. thank you #Drew for pointing it out Why does this happen and what can I do to avoid this?
Thanks in advance for the support
It is likely you are not getting the same package update.
You have installed a snapshot package. This is a package which is linked to the
head of the current Emacs development repository. It is common for snapshot
packages to be automatically setup to do a fresh build on a nightly basis to
pick up the most recent changes. So, what you are likely seeing is actual
updates. This will likely continue until the next version of Emacs is
released.
If what you really wanted was to update to emacs 25.1, which is the most recent
emacs release, then you can follow the instructions at this link
The error that occurs after downloading at snapshot version of a package is similar to the following:
$ sudo update-info-dir
install-info: warning: no info dir entry in `/usr/share/info/gnash_user.info.gz'
install-info: warning: no info dir entry in `/usr/share/info/gnash_ref.info.gz'
That is because both info pages are lacking a description.
This is the job of the person managing the info for, in this case, the gnash package. Often the coder also writes the info page for the package.
It is not possible to ask for an adept info hacker to write the description because not all hackers in IT understand what that package actually does.

Which missing library results in the message '/usr/bin/ld: cannot find -lglib-2.0'?

I am cross compiling a Lazarus program, creating a 32bit program on a 64bit Ubuntu 14.04 Trusty Tahr system, and everything apparently compiles to the very end when I get this messsage
/usr/bin/ld: cannot find -lglib-2.0
What is the full name of the library whose absence results in this error mesage?
libc6-dev:i386 appears to be the most likely library, but when I try to install it with apt indicates build-essential g++ gcc gcc-multilib will be removed so I abort it.
sudo apt-get install libc6-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
linux-libc-dev linux-libc-dev:i386
Suggested packages:
glibc-doc:i386 manpages-dev:i386
Recommended packages:
gcc:i386 c-compiler:i386
The following packages will be REMOVED
build-essential g++ gcc gcc-multilib
The following NEW packages will be installed
libc6-dev:i386 linux-libc-dev:i386
The following packages will be upgraded:
linux-libc-dev
1 to upgrade, 2 to newly install, 4 to remove and 18 not to upgrade.
Need to get 3,126 kB of archives.
After this operation, 12.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]
It turns out it was the libglib2.0-0:i386 package. It was already installed earlier, but it had not been fully configured.
It was present in the /lib/i386-linux directory and I had to create a symlink to it include it to the fpc.cfg configuration file used by Free Pascal.
locate libglib | grep ^/lib produced:
/lib/i386-linux-gnu/libglib-2.0.so.0
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0
I symlinked it with the expected name:
ln -s /lib/i386-linux-gnu/libglib-2.0.so.0 /lib/i386-linux-gnu/libglib-2.0.so
then added to the Lazarus installations fpc.cfg file
#ifdef cpui386
-Fl/usr/lib32
-Fl/lib/i386-linux-gnu
#endif

SBT install failure with aptitude on Ubuntu 14.04

I receive several errors when I attempt to install sbt on Ubuntu via aptitude with the instructions from the scala-sbt homepage:
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-get update
sudo apt-get install sbt
http://www.scala-sbt.org/0.13/tutorial/Installing-sbt-on-Linux.html
First I get a package validation error and then a segmentation fault.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
sbt
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 1,041 kB of archives.
After this operation, 1,224 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
sbt
Install these packages without verification? [y/N] y
E: Method https has died unexpectedly!
E: Sub-process https received a segmentation fault.
EDIT:
I can browse the mirror fine without any cert errors.
Confirming which mirror it's using with apt-cache.
$ sudo apt-cache policy sbt
sbt:
Installed: (none)
Candidate: 0.13.7
Version table:
0.13.7 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.6 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.5 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.2 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.1-0.1-build-001 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.0-0.1-build-001 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.12.4-0.1-build-001 0
500 https://dl.bintray.com/sbt/debian/ Packages
EDIT 2: I ended up just downloading the package manually and installing it with dpkg.
There are related answers which lead me to this solution:
wget https://dl.bintray.com/sbt/debian/sbt-0.13.7.deb
sudo dpkg -i sbt-0.13.7.deb
P.S. I think that officially documented way does not work because they didn't provide the public key used by apt to authenticate packages.
P.P.S. After some research I've found that this issue is more related to the apt package, there are many reports about this error at bugs.launchpad.net. So, while it's still an issue that sbt didn't provide public key, but it shouldn't cause this error. I hope canonical will resolve this soon.
Related:
Install sbt on ubuntu [closed]
Install Java Scala and SBT on Debian (useless pain in the ass)
Manual install is also available:
http://www.scala-sbt.org/0.13/tutorial/Manual-Installation.html
Also, as a temporary workaround, you could use HTTP repository address instead of HTTPS.
Just open file /etc/apt/sources.list.d/sbt.list and replace
deb https://dl.bintray.com/sbt/debian /
with
deb http://dl.bintray.com/sbt/debian /