libgpiod_pulsein64 not found
See original GitHub issueI tried running test of pulseIn on a 64 Bit RaspiOS system and it complained that libgpiod_pulsein64 is not found.
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import board
>>> import pulseio
>>> pulses = pulseio.PulseIn(board.D18)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/dist-packages/adafruit_blinka/microcontroller/bcm283x/pulseio/PulseIn.py", line 74, in __init__
self._process = subprocess.Popen(cmd)
File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.9/dist-packages/adafruit_blinka/microcontroller/bcm283x/pulseio/libgpiod_pulsein64'
>>>
I created my own
sudo apt install libgpiod-dev
git clone https://github.com/adafruit/libgpiod_pulsein.git
cd libgpiod_pulsein/src
make
sudo cp libgpiod_pulsein /usr/local/lib/python3.9/dist-packages/adafruit_blinka/microcontroller/bcm283x/pulseio/libgpiod_pulsein64
and it now works fine - even ran the dht22 simpletest!
pi@gjnpi4test64bit:~/libgpiod_pulsein/src $ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import board
>>> import pulseio
>>> pulses = pulseio.PulseIn(board.D18)
>>>
pi@gjnpi4test64bit:~ $ python3 dht.py
Temp: 77.0 F / 25.0 C Humidity: 33.0%
Temp: 76.5 F / 24.7 C Humidity: 22.5%
Temp: 76.3 F / 24.6 C Humidity: 22.4%
However, I see that libgpiod_pulsein64 is in the repository but it is not installed via sudo pip3 install adafruit-blinka https://github.com/adafruit/Adafruit_Blinka/tree/main/src/adafruit_blinka/microcontroller/bcm283x/pulseio
does this line have to be modified to include libgpiod_pulsein64? https://github.com/adafruit/Adafruit_Blinka/blob/main/setup.py#L70
If that is sll it needs, I’ll be happy to create a PR. I just wanted to check that there was not more that needed to be done.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Issues - GitHub
I am running Ubuntu Server 20.04 LTS 64-bit on a Raspberry Pi 3 B. I have a DHT11 ... Hi, it looks like...
Read more >GPIO character device v1 API not enabled in kernel
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party...
Read more >CircuitPython Libraries on Linux and Google Coral
use the python libgpiod bindings. ... ttymxc2 does not exist) so these pins cannot be used for GPIO ... You can use these...
Read more >Applications - Pin Control and GPIO - Developer Help
The libgpiod was created a better way to access the GPIO driver. There are six commands in libgpiod tools: gpiodetect: list all gpiochips...
Read more >Read out DHT11/22 with RaspberryPi 4 and Ubuntu Server
I recently bought a RaspberryPi 4 and installed Ubuntu Server 20.04 64 Bit on it. There are many tutorials available how to read...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hmm, ok. I didn’t realize Pip was not installing the binary, which is a problem. I’ll take a look into if there’s a way to remedy that. As for libgpiod-dev, we can update our raspberry pi blinka installer script, which might also be the answer for the missing binary.
I am also having this issue, I have had to do the following in my Dockerfile: