wallysalami/tkgpio

Unable to run the simple_circuit.py example

jiortigosa opened this issue · 2 comments

Hello,
I'm quite a novice in the gpio usage.
I want to emulate a Raspberry Pi with gpio to play with it.
I am using a vmware virtual machine with Raspbian OS Desktop.
When I try to run the simple_circui.py, I get an error at the very first line, when trying to import the TKCircuit from tkgpio.

It has something to do with something called PortAudio library

File "/xxxx/emulador01.py", line 3, in
from tkgpio import TkCircuit
File "/home/pi/.local/lib/python3.7/site-packages/tkgpio/init.py", line 1, in
from .tkgpio import *
File "/home/pi/.local/lib/python3.7/site-packages/tkgpio/tkgpio.py", line 6, in
from sounddevice import play, stop
File "/home/pi/.local/lib/python3.7/site-packages/sounddevice.py", line 71, in
raise OSError('PortAudio library not found')
OSError: PortAudio library not found

==========================

I would appreciatte some help...

emulador01.pdf

Hello, there!

Running tkgpio on Linux requires the portaudio19-dev library, which can be installed with your package manager (i.e. apt-get).

I will explain that next time I update the README. Maybe there is way to put it as a dependency on setup.py. Or I could disable the buzzer sound if PortAudio is not available.

It did fix it!
Thank you!