Package Details: python-picamera 1.13-3

Git Clone URL: https://aur.archlinux.org/python-picamera.git (read-only)
Package Base: python-picamera
Description: pure Python interface to the Raspberry Pi camera module
Upstream URL: https://pypi.python.org/pypi/picamera/
Licenses: BSD
Submitter: jpike
Maintainer: TrialnError
Last Packager: TrialnError
Votes: 2
Popularity: 0.000000
First Submitted: 2015-02-17 01:47
Last Updated: 2019-10-21 21:04

Latest Comments

1 2 Next › Last »

TrialnError commented on 2019-10-21 20:56

Thanks for looking into this. First let me say something about the PKGBUILD. The step done in prepare is unnecessary :) If you declare in source a branch, the makepkg branch is based upon this specific branch. So most of the time makepkg == master unless another branch is specified in the source line. Regarding the missing .so. Well, at least it seems there is a need to add the raspberrypi-firmware package to the deps. As the guys only officially support armv7h I'm not surprised, that there isn't a package for the other archs. But you could try to build the raspberrypi-firmware package for aarch64 locally.

And if it is easily possible, I could backport the specific patch which let it build for other architectures

GeorgeRaven commented on 2019-10-21 08:42

Hey so I created a PKGBUILD to test the git repo and to see if I could solve this issue, which does indeed install:

# Maintainer: George Raven <GeorgeRavenCommunity AT pm dot me>
pkgname=picamera-git
_pkgsrcname="picamera"
pkgver=release.1.13.r66.93a0808
pkgrel=1
pkgdesc="Python picamera lib."
arch=('aarch64')
url="https://github.com/waveform80/picamera"
_branch="master"
license=('BSD')
groups=()
depends=('python' 'python-numpy')
makedepends=('git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
source=("${_pkgsrcname}::git+${url}#branch=${_branch}")
noextract=()
md5sums=('SKIP')

pkgver() {
        cd "${srcdir}/${_pkgsrcname}"
        printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

prepare() {
        cd "${srcdir}/${_pkgsrcname}"
        git checkout ${_branch} # get off of makepkg branch
}

package() {
        cd "${srcdir}/${_pkgsrcname}"
        python3 ./setup.py install --prefix=/usr --root="$pkgdir/" --optimize=1
        install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

But on use I.E >> import picamera, it fails with:

>>> import picamera
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.7/site-packages/picamera/__init__.py", line 72, in <module>
    from picamera.exc import (
  File "/usr/lib/python3.7/site-packages/picamera/exc.py", line 41, in <module>
    import picamera.mmal as mmal
  File "/usr/lib/python3.7/site-packages/picamera/mmal.py", line 47, in <module>
    from .bcm_host import VCOS_UNSIGNED
  File "/usr/lib/python3.7/site-packages/picamera/bcm_host.py", line 47, in <module>
    _lib = ct.CDLL('libbcm_host.so')
  File "/usr/lib/python3.7/ctypes/__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libbcm_host.so: cannot open shared object file: No such file or directory
>>> import picamera
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.7/site-packages/picamera/__init__.py", line 72, in <module>
    from picamera.exc import (
  File "/usr/lib/python3.7/site-packages/picamera/exc.py", line 41, in <module>
    import picamera.mmal as mmal
  File "/usr/lib/python3.7/site-packages/picamera/mmal.py", line 47, in <module>
    from .bcm_host import VCOS_UNSIGNED
  File "/usr/lib/python3.7/site-packages/picamera/bcm_host.py", line 47, in <module>
    _lib = ct.CDLL('libbcm_host.so')
  File "/usr/lib/python3.7/ctypes/__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libbcm_host.so: cannot open shared object file: No such file or directory

Upon investigation on x86_64 (nothing):

x86_64 ~> sudo pacman -Fs libbcm_host.so
x86_64 ~> 

on aarch64 (nothing):

aarch64 ~> sudo pacman -Fs libbcm_host.so
aarch64 ~>

on armv7l:

armv7l ~> sudo pacman -Fs libbcm_host.so
alarm/raspberrypi-firmware 20191007-1
    opt/vc/lib/libbcm_host.so

Looks like this shared object is only present in the raspberry pi firmware. Do you know anything about this?

TrialnError commented on 2019-05-29 23:04

Thanks for the info GeorgeRaven. It could be really the case, that picamera only recognizes the official supported arch (armv7h). The whole armv8h isn't really officially supported and since the last update of picamera is quite old, it maybe just cannot check against the 64bit arch.

GeorgeRaven commented on 2019-05-28 19:29

Hey TrialInError. I will attempt a pure makepkg -si (on aarch64) when I can and append the results to the end of this. However re flashing the RPi with Archlinux Arm ARMv7l (32bit RPi 3B+) instead of aarch64 ARMv8 (on the same pi) it builds fine with pikaur, and makepkg. Lastly I believe the camera may be nonfunctional on the 64 bit os at the raspbian camera specific drivers don't compile for 64 bit, but that still doesn't reveal why it is not recognized as a raspberry pi.

Edit (exactly the same result although more descriptive now):

~/g/python-picamera> makepkg -si
==> Making package: python-picamera 1.13-2 (Mon Oct 21 08:09:34 2019)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading picamera-1.13.tar.gz...
  % 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  140k  100  140k    0     0   522k      0 --:--:-- --:--:-- --:--:--  522k
==> Validating source files with sha256sums...
    picamera-1.13.tar.gz ... Passed
==> Extracting sources...
  -> Extracting picamera-1.13.tar.gz with bsdtar
==> Starting build()...
running build
running build_py
creating build
creating build/lib
creating build/lib/picamera
copying picamera/__init__.py -> build/lib/picamera
copying picamera/array.py -> build/lib/picamera
copying picamera/frames.py -> build/lib/picamera
copying picamera/camera.py -> build/lib/picamera
copying picamera/streams.py -> build/lib/picamera
copying picamera/encoders.py -> build/lib/picamera
copying picamera/mmal.py -> build/lib/picamera
copying picamera/mmalobj.py -> build/lib/picamera
copying picamera/exc.py -> build/lib/picamera
copying picamera/color.py -> build/lib/picamera
copying picamera/bcm_host.py -> build/lib/picamera
copying picamera/renderers.py -> build/lib/picamera
copying picamera/display.py -> build/lib/picamera
running egg_info
writing picamera.egg-info/PKG-INFO
writing dependency_links to picamera.egg-info/dependency_links.txt
writing requirements to picamera.egg-info/requires.txt
writing top-level names to picamera.egg-info/top_level.txt
reading manifest file 'picamera.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'debian'
no previously-included directories found matching 'docs'
writing manifest file 'picamera.egg-info/SOURCES.txt'
==> Entering fakeroot environment...
==> Starting package()...
running install
Traceback (most recent call last):
  File "setup.py", line 145, in <module>
    main()
  File "setup.py", line 140, in main
    cmdclass             = {'install': CustomInstallCommand},
  File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 111, in run
    raise ValueError('Unable to determine if this system is a Raspberry Pi')
ValueError: Unable to determine if this system is a Raspberry Pi
==> ERROR: A failure occurred in package().
    Aborting...

TrialnError commented on 2019-05-26 21:17

Hello GeorgeRaven. What happens if you use makepkg to build the package? Does it work? And how was pikaur build packages? Does it create a container, or chroot, or something else?

GeorgeRaven commented on 2019-05-25 08:23

Hey, im having the exact same issue on aarch64 raspberry pi 3B+, trying to build using pikaur -S python-picamera:

running install
Traceback (most recent call last):
  File "setup.py", line 145, in <module>
    main()
  File "setup.py", line 140, in main
    cmdclass             = {'install': CustomInstallCommand},
  File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 111, in run
    raise ValueError('Unable to determine if this system is a Raspberry Pi')
ValueError: Unable to determine if this system is a Raspberry Pi
==> ERROR: A failure occurred in package().
    Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited/status=4
Service runtime: 11.577s

Command 'systemd-run --pipe --wait -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/python-picamera makepkg --force' failed to execute.

TrialnError commented on 2018-12-12 22:50

How did you try to build this package? With makepkg or some wrapper like yaourt? Currently I cannot reproduce your issue so maybe the issue is something else.

greyltc commented on 2018-12-05 17:22

raise ValueError('Unable to determine if this system is a Raspberry Pi') in setup.py here any ideas?

(and yes I'm running on a raspberry pi)

pschmitt commented on 2017-03-10 07:11

A python2 version would be great. picamera does not go along well with python 3.6

jpike commented on 2015-02-27 13:30

@trishika thanks for your comment, I've updated the package now.