neilgl, I switched to the venv and ran "pip install pibooth", that worked, pibooth was installed. I then entered "pibooth' to launch it. It started to but I
, the LED's are on GPIO and 22. They also recommend to have a auto shutdown button to install that between GPIO and got an error, "GPIO busy". Per the setup for pibooth I had to connect two pushbuttons and two LED's, the pushbuttons are on GPIO and ground. The readout on terminal is long so I wanted to attach a file with a copy of it but I don't see how I can do that. Below is the copy from the terminal
thanks
```
john@raspberrypi:~ $ source env/bin/activate
bash: env/bin/activate: No such file or directory
john@raspberrypi:~ $ python -m venv --system-site-packages env
john@raspberrypi:~ $ source env/bin/activate
(env) john@raspberrypi:~ $ pip install pibooth
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pibooth
Downloading pibooth-2.0.8-py3-none-any.whl (814 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 814.1/814.1 kB 2.3 MB/s eta 0:00:00
Collecting Pillow==9.2.0
Downloading Pillow-9.2.0-cp311-cp311-manylinux_2_28_aarch64.whl (3.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 3.1 MB/s eta 0:00:00
Requirement already satisfied: pygame>=1.9.6 in /usr/lib/python3/dist-packages (from pibooth) (2.1.2)
Collecting pygame-menu==4.0.7
Downloading https://www.piwheels.org/simple/pygame- ... ne-any.whl (1.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 1.3 MB/s eta 0:00:00
Collecting pygame-vkeyboard>=2.0.8
Downloading https://www.piwheels.org/simple/pygame- ... ne-any.whl (390 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 390.4/390.4 kB 1.8 MB/s eta 0:00:00
Requirement already satisfied: psutil>=5.5.1 in /usr/lib/python3/dist-packages (from pibooth) (5.9.4)
Collecting pluggy>=0.13.1
Downloading https://www.piwheels.org/simple/pluggy/ ... ne-any.whl (20 kB)
Requirement already satisfied: gpiozero>=1.5.1 in /usr/lib/python3/dist-packages (from pibooth) (2.0)
Collecting pyperclip
Downloading https://www.piwheels.org/simple/pypercl ... ne-any.whl (10 kB)
Requirement already satisfied: typing-extensions in /usr/lib/python3/dist-packages (from pygame-menu==4.0.7->pibooth) (4.4.0)
Installing collected packages: pyperclip, pygame-vkeyboard, pygame-menu, pluggy, Pillow, pibooth
Attempting uninstall: Pillow
Found existing installation: Pillow 9.4.0
Not uninstalling pillow at /usr/lib/python3/dist-packages, outside environment /home/john/env
Can't uninstall 'Pillow'. No files were found to uninstall.
Successfully installed Pillow-9.2.0 pibooth-2.0.8 pluggy-1.4.0 pygame-menu-4.0.7 pygame-vkeyboard-2.0.9 pyperclip-1.8.2
(env) john@raspberrypi:~ $ pibooth
pygame 2.1.2 (SDL 2.26.5, Python 3.11.2)
Hello from the pygame community. https://www.pygame.org/contribute.html
pygame-menu 4.0.7
[ INFO ] pibooth : Installed plugins:
[ INFO ] pibooth : Generate the translation file in '/home/john/.config/pibooth/translations.cfg'
[ INFO ] pibooth : Generate the configuration file in '/home/john/.config/pibooth/pibooth.cfg'
[ INFO ] pibooth : Starting the photo booth application on Raspberry pi 4B
[ WARN:0@6.101] global ./modules/videoio/src/cap_gstreamer.cpp (2401) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Failed to allocate required memory.
[ WARN:0@6.102] global ./modules/videoio/src/cap_gstreamer.cpp (1356) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0@6.102] global ./modules/videoio/src/cap_gstreamer.cpp (862) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
[ INFO ] pibooth : Configuring OpenCV camera ...
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gpiozero/pins/pi.py", line 408, in pin
pin = self.pins[info]
~~~~~~~~~^^^^^^
KeyError: PinInfo(number=7, name='GPIO4', names=frozenset({'WPI7', 'GPIO4', 'BOARD7', 'J8:7', 4, 'BCM4', '4'}), pull='', row=4, col=1, interfaces=frozenset({'', 'gpio', 'uart', 'dpi', 'spi', 'i2c'}))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/john/env/bin/pibooth", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/john/env/lib/python3.11/site-packages/pibooth/booth.py", line 490, in main
app = PiApplication(config, plugin_manager)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/john/env/lib/python3.11/site-packages/pibooth/booth.py", line 140, in __init__
self.leds = LEDBoard(capture="BOARD" + config.get('CONTROLS', 'picture_led_pin'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 103, in __call__
self = super().__call__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/boards.py", line 399, in __init__
super().__init__(*pins, pwm=pwm, active_high=active_high,
File "/usr/lib/python3/dist-packages/gpiozero/boards.py", line 300, in __init__
**{
^
File "/usr/lib/python3/dist-packages/gpiozero/boards.py", line 303, in <dictcomp>
LEDClass(
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 103, in __call__
self = super().__call__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/output_devices.py", line 192, in __init__
super().__init__(pin, active_high=active_high,
File "/usr/lib/python3/dist-packages/gpiozero/output_devices.py", line 74, in __init__
super().__init__(pin, pin_factory=pin_factory)
File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 75, in __init__
super().__init__(*args, **kwargs)
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 549, in __init__
pin = self.pin_factory.pin(pin)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/pins/pi.py", line 410, in pin
pin = self.pin_class(self, info)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/pins/lgpio.py", line 126, in __init__
lgpio.gpio_claim_input(
File "/usr/lib/python3/dist-packages/lgpio.py", line 755, in gpio_claim_input
return _u2i(_lgpio._gpio_claim_input(handle&0xffff, lFlags, gpio))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/lgpio.py", line 458, in _u2i
raise error(error_text(v))
lgpio.error: 'GPIO busy'
(env) john@raspberrypi:~ $
```
, the LED's are on GPIO and 22. They also recommend to have a auto shutdown button to install that between GPIO and got an error, "GPIO busy". Per the setup for pibooth I had to connect two pushbuttons and two LED's, the pushbuttons are on GPIO and ground. The readout on terminal is long so I wanted to attach a file with a copy of it but I don't see how I can do that. Below is the copy from the terminal
thanks
```
john@raspberrypi:~ $ source env/bin/activate
bash: env/bin/activate: No such file or directory
john@raspberrypi:~ $ python -m venv --system-site-packages env
john@raspberrypi:~ $ source env/bin/activate
(env) john@raspberrypi:~ $ pip install pibooth
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pibooth
Downloading pibooth-2.0.8-py3-none-any.whl (814 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 814.1/814.1 kB 2.3 MB/s eta 0:00:00
Collecting Pillow==9.2.0
Downloading Pillow-9.2.0-cp311-cp311-manylinux_2_28_aarch64.whl (3.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 3.1 MB/s eta 0:00:00
Requirement already satisfied: pygame>=1.9.6 in /usr/lib/python3/dist-packages (from pibooth) (2.1.2)
Collecting pygame-menu==4.0.7
Downloading https://www.piwheels.org/simple/pygame- ... ne-any.whl (1.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 1.3 MB/s eta 0:00:00
Collecting pygame-vkeyboard>=2.0.8
Downloading https://www.piwheels.org/simple/pygame- ... ne-any.whl (390 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 390.4/390.4 kB 1.8 MB/s eta 0:00:00
Requirement already satisfied: psutil>=5.5.1 in /usr/lib/python3/dist-packages (from pibooth) (5.9.4)
Collecting pluggy>=0.13.1
Downloading https://www.piwheels.org/simple/pluggy/ ... ne-any.whl (20 kB)
Requirement already satisfied: gpiozero>=1.5.1 in /usr/lib/python3/dist-packages (from pibooth) (2.0)
Collecting pyperclip
Downloading https://www.piwheels.org/simple/pypercl ... ne-any.whl (10 kB)
Requirement already satisfied: typing-extensions in /usr/lib/python3/dist-packages (from pygame-menu==4.0.7->pibooth) (4.4.0)
Installing collected packages: pyperclip, pygame-vkeyboard, pygame-menu, pluggy, Pillow, pibooth
Attempting uninstall: Pillow
Found existing installation: Pillow 9.4.0
Not uninstalling pillow at /usr/lib/python3/dist-packages, outside environment /home/john/env
Can't uninstall 'Pillow'. No files were found to uninstall.
Successfully installed Pillow-9.2.0 pibooth-2.0.8 pluggy-1.4.0 pygame-menu-4.0.7 pygame-vkeyboard-2.0.9 pyperclip-1.8.2
(env) john@raspberrypi:~ $ pibooth
pygame 2.1.2 (SDL 2.26.5, Python 3.11.2)
Hello from the pygame community. https://www.pygame.org/contribute.html
pygame-menu 4.0.7
[ INFO ] pibooth : Installed plugins:
[ INFO ] pibooth : Generate the translation file in '/home/john/.config/pibooth/translations.cfg'
[ INFO ] pibooth : Generate the configuration file in '/home/john/.config/pibooth/pibooth.cfg'
[ INFO ] pibooth : Starting the photo booth application on Raspberry pi 4B
[ WARN:0@6.101] global ./modules/videoio/src/cap_gstreamer.cpp (2401) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Failed to allocate required memory.
[ WARN:0@6.102] global ./modules/videoio/src/cap_gstreamer.cpp (1356) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0@6.102] global ./modules/videoio/src/cap_gstreamer.cpp (862) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
[ INFO ] pibooth : Configuring OpenCV camera ...
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gpiozero/pins/pi.py", line 408, in pin
pin = self.pins[info]
~~~~~~~~~^^^^^^
KeyError: PinInfo(number=7, name='GPIO4', names=frozenset({'WPI7', 'GPIO4', 'BOARD7', 'J8:7', 4, 'BCM4', '4'}), pull='', row=4, col=1, interfaces=frozenset({'', 'gpio', 'uart', 'dpi', 'spi', 'i2c'}))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/john/env/bin/pibooth", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/john/env/lib/python3.11/site-packages/pibooth/booth.py", line 490, in main
app = PiApplication(config, plugin_manager)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/john/env/lib/python3.11/site-packages/pibooth/booth.py", line 140, in __init__
self.leds = LEDBoard(capture="BOARD" + config.get('CONTROLS', 'picture_led_pin'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 103, in __call__
self = super().__call__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/boards.py", line 399, in __init__
super().__init__(*pins, pwm=pwm, active_high=active_high,
File "/usr/lib/python3/dist-packages/gpiozero/boards.py", line 300, in __init__
**{
^
File "/usr/lib/python3/dist-packages/gpiozero/boards.py", line 303, in <dictcomp>
LEDClass(
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 103, in __call__
self = super().__call__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/output_devices.py", line 192, in __init__
super().__init__(pin, active_high=active_high,
File "/usr/lib/python3/dist-packages/gpiozero/output_devices.py", line 74, in __init__
super().__init__(pin, pin_factory=pin_factory)
File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 75, in __init__
super().__init__(*args, **kwargs)
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 549, in __init__
pin = self.pin_factory.pin(pin)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/pins/pi.py", line 410, in pin
pin = self.pin_class(self, info)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/pins/lgpio.py", line 126, in __init__
lgpio.gpio_claim_input(
File "/usr/lib/python3/dist-packages/lgpio.py", line 755, in gpio_claim_input
return _u2i(_lgpio._gpio_claim_input(handle&0xffff, lFlags, gpio))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/lgpio.py", line 458, in _u2i
raise error(error_text(v))
lgpio.error: 'GPIO busy'
(env) john@raspberrypi:~ $
```
Statistics: Posted by Stumpy_L — Sat Mar 09, 2024 4:54 pm