Been working for days trying to get Hologram SDK working.
When run: sudo hologram version
in a terminal I get:
sudo: hologram: command not found
When I ran: curl -L hologram.io/python-install | bash to install the SDK part of what I got was:
E: Unable to locate package libpython3.7-dev
E: Couldn’t find any package by glob ‘libpython3.7-dev’
Since the latest version of Raspian is bullseye that comes with python 3.9.2 I’m wondering if one or both of these are the problem.
Any help would be appreciated.
Here are the steps did:
Raspberry pi Model 3B+ V1.3
SARA-R410M modem
fresh install: “Raspbian GNU/Linux 11 (bullseye)”
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 166 100 166 0 0 1784 0 --:–:-- --:–:-- --:–:-- 1804
100 166 100 166 0 0 489 0 --:–:-- --:–:-- --:–:-- 1064
100 166 100 166 0 0 261 0 --:–:-- --:–:-- --:–:-- 261
100 3880 100 3880 0 0 4340 0 --:–:-- --:–:-- --:–:-- 4340
Linux system detected
Hit:1 Index of /debian bullseye InRelease
Hit:2 Index of /raspbian bullseye InRelease
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
All packages are up to date.
python3 is already installed.
ps is already installed.
kill is already installed.
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package libpython3.7-dev
E: Couldn’t find any package by glob ‘libpython3.7-dev’
reboot
on the modem, the blue light is on, red light blinking
~ $ sudo hologram version
sudo: hologram: command not found
If you want you can checkout that branch and it will work but you wont be able to generate OTPs and will instead have to send the device key to authenticate
For anyone that stumbles onto this thread/problem, here’s the solution I did:
Loaded a legacy version of Raspian. I couldn’t discover how to use the Windows Raspberry Pi Imager to install legacy version of Raspian. So:
from: Operating system images – Raspberry Pi
downloaded a zip file for :
Raspberry Pi OS (Legacy) with desktop
Release date: January 28th 2022
System: 32-bit
Kernel version: 5.10
Debian version: 10 (buster)
Then used Etcher (google it or here’s one “how to” page: ref: https://linuxize.com/post/how-to-install-raspbian-on-raspberry-pi/) to burn Raspian (Buster) onto a SD card.
By default it comes loaded with python2 & python 3:
At a command prompt run: python –V will get:
Python 2.7.16
If run: python3 –V will get:
Python 3.7.3
Then:
Installed hologram
curl -L hologram.io/python-install | bash
no messages; no errors
It Works!
even after running:
sudo apt-get update
sudo apt-get upgrade
python3 stayed at version 3.7.3 (I was scare it might upgrade to 3.9)
I am having the same install issue…I have python 3.9 installed as the latest version, have manually installed 3.7 but can’t figure out how to get the libpython3.7-dev package installed…is there any way to make this work with 3.9? Help.
Marc, I came across the libpython3.7-dev package install problem. Didn’t find a solution. That’s why I started from scratch and loaded a legacy Raspian that had python 3.7 as default. (Don’t know if your using Raspberry pi - if not perhaps there’s a legacy version with python 3.7 of whatever you’re using).
Karl
Thanks. Yes, I’m using a Pi and I guess I will do the same thing…very frustrating that the hologram developers are requiring us to use and outdated setup to get this to work.
I used the pip install method to install the SDK, but when I tried to run it got an error:
sudo ~/.local/bin/hologram send --cloud --devicekey `cat device.key` -t "hello" -v "this is a test"
Traceback (most recent call last):
File "/home/pi/.local/bin/hologram", line 4, in <module>
__import__('pkg_resources').require('hologram-python==0.9.0')
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3243, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3226, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 568, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 772, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'hologram-python==0.9.0' distribution was not found and is required by the application
Hmm I can look into it but the error does seem to be originating from the script you have in .local/bin/hologram. How did you install the script to that location? I ask because even our non-working yet latest SDK is 0.9.1 not 0.9.0: hologram-python/version.txt at develop · hologram-io/hologram-python · GitHub
Though the one in that branch is an older one and still says 0.9.0 so just want to know whats pointing where and how its determining the version numbers. You might have to force install the “older” version if you already have the newer one installed.
Thanks, I’ll look more into that. Its obviously been awhile since I made that branch on github to deal with this problem though I do remember it working when I pushed up the branch.
To just get around the headache for now I released a version for python 3.7, 3.8, and 3.9 and named it as such in the pypi release: python-sdk-auth · PyPI
Try just installing it normally and see if that works for now while I look into this a bit more. Ideally we will decouple the auth package from the SDK so that it doesn’t block people from using it since the SDK itself should work on any version > 3.7 since its not precompiled unlike the Auth library which is not publicly facing.
Hi Dom,
I followed your instructions but I’m getting the following error:
File “/home/pi/.local/bin/hologram”, line 4, in import(‘pkg_resources’).require(‘hologram-python==0.9.0’)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3243, in
def _initialize_master_working_set():
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3226, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 568, in _build_master
ws.require(requires)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 886, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 772, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘hologram-python==0.9.0’ distribution was not found and is required by the application
You can ignore that advice I gave above, I just made new releases instead that target the respective python versions. So just install normally like in our help docs if you are on python 3.9
Hi Dom,
same issue, here is the result; I’m using python 3.9.2
pi@raspberrypi:~ $ date
Wed 30 Mar 2022 12:57:11 PM EDT
pi@raspberrypi:~ $ curl -L hologram.io/python-install | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 166 100 166 0 0 2593 0 --:–:-- --:–:-- --:–:-- 2593
100 166 100 166 0 0 764 0 --:–:-- --:–:-- --:–:-- 764
100 166 100 166 0 0 373 0 --:–:-- --:–:-- --:–:-- 11066
100 3880 100 3880 0 0 6319 0 --:–:-- --:–:-- --:–:-- 6319
Linux system detected
Hit:1 Index of /debian-security bullseye-security InRelease
Hit:2 Index of /debian bullseye InRelease
Hit:3 Index of /debian bullseye-updates InRelease
Hit:4 Index of /debian bullseye InRelease
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
All packages are up to date.
python3 is already installed.
ps is already installed.
kill is already installed.
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package libpython3.7-dev
E: Couldn’t find any package by glob ‘libpython3.7-dev’
pi@raspberrypi:~ $ date
Wed 30 Mar 2022 12:59:23 PM EDT