PiCamera Modul

  • Hallo Leute,

    ich bekomme bald wirklich eine Kriese.... Das ganze Wochenende an verschiedenen Themen gearbeitet und nur Rückschläge. Nichts hat funktioniert.

    Jetzt wollte ich die Kamera mal per Python ansprechen und habe versucht picamera zu installieren.

    Ich habe es mit dieser Anleitung gemacht.

    https://www.raspberrypi.org/documentation/…ython/README.md

    ABER WAS IST.... WIEDER MAL EINEN SCHLAG INS GESICHT.
    Installation alles gut. Kamera unter raspi-config aktiviert.

    Dann unter Python
    import picamera

    findet das Modul nicht

    Code
    Python 2.7.11 (default, Mar  5 2016, 00:18:37) 
    [GCC 4.9.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import picamera
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named picamera
    >>>


    Das ist mein System ich habe bereits von Paketquellen ein Update gemacht.
    RASPBIAN JESSIE LITE
    Minimal image based on Debian Jessie
    Version:March 2016
    Release date:2016-03-18
    Kernel version:4.1

    Es dauert lange bis ich ans aufgeben denke. Aber nach dem Wochenende bin ich an dem Punkt das ich alles in die Tonne kloppe.

    Edited once, last by RaspPiHF (May 8, 2016 at 10:27 PM).

  • Wie genau hast du das Module installiert?

    Python2 ist nicht kompatibel mit Python3. Die Module werden daher in unterschiedlichen Verzeichnissen gespeichert - bzw allgemein ist python2 in einem anderen Verzeichnis wie python3 installiert, weshalb man auch beides drauf haben kann.

    Kann es vielleicht sein das du das Module für python3 installiert hast?

    Bitte Ausgabe posten:

    Code
    python -c 'help("modules")' | grep picamera
    
    
    python3 -c 'help("modules")' | grep picamera

    Ich empfehle die Installation über den Python eigenen Paketmanager pip

    Python2:

    Code
    sudo apt-get install python-pip
    
    
    sudo pip install picamera

    Python3:

    Code
    sudo apt-get install python3-pip
    
    
    sudo pip3 install picamera
  • Ich habe es so installiert
    War als user root angemeldet

    Code
    apt-get update
    apt-get install python-picamera

    Dann habe ich einen reboot gemacht dann habe ich Python auf gerufen
    und import picamera eingegeben.

    So wie es auf der Seite beschrieben ist
    https://www.raspberrypi.org/documentation/…ython/README.md

    Update 1:

    habe es jetzt per pip installiert...

    sudo apt-get install python-pip
    sudo pip install picamera

    python -c 'help("modules")' | grep picamera
    Keine Ausgabe.... einfach nichts...

    ?????

    Edited once, last by RaspPiHF (May 8, 2016 at 10:45 PM).

  • Ein Reboot ist überflüssig - man muss Linux nicht nach einer Softwareinstallation neu starten.

    Ist bei der Installation vielleicht irgend was schief gelaufen?
    Kontrollier mal ob das Paket auch wirklich via apt-get installiert wurde:

    Code
    dpkg -L python-picamera

    Siehe auch noch mal Beitrag#2

  • habe es jetzt per pip installiert...

    sudo apt-get install python-pip
    sudo pip install picamera

    python -c 'help("modules")' | grep picamera
    Keine Ausgabe.... einfach nichts...

    ?????


    root@362fd30:~# dpkg -L python-picamera
    /.
    /usr
    /usr/lib
    /usr/lib/python2.7
    /usr/lib/python2.7/dist-packages
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info
    /usr/lib/python2.7/dist-packages/picamera
    /usr/share
    /usr/share/doc
    /usr/share/doc/python-picamera
    /usr/share/doc/python-picamera/README.rst
    /usr/share/doc/python-picamera/copyright
    /usr/share/doc/python-picamera/changelog.Debian.gz
    /usr/share/pyshared
    /usr/share/pyshared/picamera-1.10.egg-info
    /usr/share/pyshared/picamera-1.10.egg-info/dependency_links.txt
    /usr/share/pyshared/picamera-1.10.egg-info/SOURCES.txt
    /usr/share/pyshared/picamera-1.10.egg-info/top_level.txt
    /usr/share/pyshared/picamera-1.10.egg-info/requires.txt
    /usr/share/pyshared/picamera-1.10.egg-info/PKG-INFO
    /usr/share/pyshared/picamera
    /usr/share/pyshared/picamera/camera.py
    /usr/share/pyshared/picamera/array.py
    /usr/share/pyshared/picamera/renderers.py
    /usr/share/pyshared/picamera/color.py
    /usr/share/pyshared/picamera/streams.py
    /usr/share/pyshared/picamera/__init__.py
    /usr/share/pyshared/picamera/bcm_host.py
    /usr/share/pyshared/picamera/exc.py
    /usr/share/pyshared/picamera/mmal.py
    /usr/share/pyshared/picamera/encoders.py
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info/dependency_links.txt
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info/SOURCES.txt
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info/top_level.txt
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info/requires.txt
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info/PKG-INFO
    /usr/lib/python2.7/dist-packages/picamera/camera.py
    /usr/lib/python2.7/dist-packages/picamera/array.py
    /usr/lib/python2.7/dist-packages/picamera/renderers.py
    /usr/lib/python2.7/dist-packages/picamera/color.py
    /usr/lib/python2.7/dist-packages/picamera/streams.py
    /usr/lib/python2.7/dist-packages/picamera/__init__.py
    /usr/lib/python2.7/dist-packages/picamera/bcm_host.py
    /usr/lib/python2.7/dist-packages/picamera/exc.py
    /usr/lib/python2.7/dist-packages/picamera/mmal.py
    /usr/lib/python2.7/dist-packages/picamera/encoders.py


    root@362fd30:~# python
    Python 2.7.11 (default, Mar 5 2016, 00:18:37)
    [GCC 4.9.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import picam
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named picam
    >>>


    Die Ausgabe oben stammt vom Raspi mit Jessie Lite
    Seit ich Jessie Lite habe gibt es nur ärger im System. Aber für den Raspi 3 braucht man es ja da Wheezy den Dreier nicht unterstützt.


    Habe es gerade mal per pip unter Wheezy installiert ALLES TUTI OK

    Edited once, last by RaspPiHF (May 8, 2016 at 10:50 PM).

  • ...Es gibt ja auch kein Paket namens "picam"... Bitte mehr Sorgfalt walten lassen.

    Ob Jessie Lite oder nicht ist irrelevant - ich hab auch eine Minimal-Raspbian Version. Das hat nichts mit deinem Problem zu tun. Und Wheezy untestützt auch den Pi3 - entscheidend ist hierbei nämlich nur die Firmware. Aber bitte nicht wild mixen - sowas löst keine Probleme.

    Wenn ich mir dein Chaos so angucke käme noch eine verhunzte PYTHONPATH System-Umgebungs-Variable in Frage.... Dort such python nämlich nach Modulen.


    PS: Nebenbei erwähnt: es gibt aktuell kein python-picamera über apt-get, deshalb verwundert mich deine obige Aussage

    Code
    root@raspberrypi:~# apt-cache search picamera
    root@raspberrypi:~#


    Also: keine Ahnung was du da verzapft hast :s

  • Bei meinem Post habe ich mich verschrieben aber das ändert nichts.

    root@362fd30:~# python
    Python 2.7.11 (default, Mar 5 2016, 00:18:37)
    [GCC 4.9.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import picamera
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named picamera
    >>>

    Warum Chaos? Habe nichts verändert...


    Hier mal die Ausgabe vom Wheezy

    pi@raspcam1 ~ $ dpkg -L python-picamera
    /.
    /usr
    /usr/lib
    /usr/lib/python2.7
    /usr/lib/python2.7/dist-packages
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info
    /usr/lib/python2.7/dist-packages/picamera
    /usr/share
    /usr/share/doc
    /usr/share/doc/python-picamera
    /usr/share/doc/python-picamera/README.rst
    /usr/share/doc/python-picamera/copyright
    /usr/share/doc/python-picamera/changelog.Debian.gz
    /usr/share/pyshared
    /usr/share/pyshared/picamera-1.10.egg-info
    /usr/share/pyshared/picamera-1.10.egg-info/dependency_links.txt
    /usr/share/pyshared/picamera-1.10.egg-info/SOURCES.txt
    /usr/share/pyshared/picamera-1.10.egg-info/top_level.txt
    /usr/share/pyshared/picamera-1.10.egg-info/requires.txt
    /usr/share/pyshared/picamera-1.10.egg-info/PKG-INFO
    /usr/share/pyshared/picamera
    /usr/share/pyshared/picamera/camera.py
    /usr/share/pyshared/picamera/array.py
    /usr/share/pyshared/picamera/renderers.py
    /usr/share/pyshared/picamera/color.py
    /usr/share/pyshared/picamera/streams.py
    /usr/share/pyshared/picamera/__init__.py
    /usr/share/pyshared/picamera/bcm_host.py
    /usr/share/pyshared/picamera/exc.py
    /usr/share/pyshared/picamera/mmal.py
    /usr/share/pyshared/picamera/encoders.py
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info/dependency_links.txt
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info/SOURCES.txt
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info/top_level.txt
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info/requires.txt
    /usr/lib/python2.7/dist-packages/picamera-1.10.egg-info/PKG-INFO
    /usr/lib/python2.7/dist-packages/picamera/camera.py
    /usr/lib/python2.7/dist-packages/picamera/array.py
    /usr/lib/python2.7/dist-packages/picamera/renderers.py
    /usr/lib/python2.7/dist-packages/picamera/color.py
    /usr/lib/python2.7/dist-packages/picamera/streams.py
    /usr/lib/python2.7/dist-packages/picamera/__init__.py
    /usr/lib/python2.7/dist-packages/picamera/bcm_host.py
    /usr/lib/python2.7/dist-packages/picamera/exc.py
    /usr/lib/python2.7/dist-packages/picamera/mmal.py
    /usr/lib/python2.7/dist-packages/picamera/encoders.py
    Automatisch zusammengefügt:
    PS: Nebenbei erwähnt: es gibt aktuell kein python-picamera über apt-get, deshalb verwundert mich deine obige Aussage

    Code
    root@raspberrypi:~# apt-cache search picamera
    root@raspberrypi:~#


    Also: keine Ahnung was du da verzapft hast :s
    [/quote]
    Automatisch zusammengefügt:

    Code
    root@raspberrypi:~# apt-cache search picamera
    root@raspberrypi:~#


    Also: keine Ahnung was du da verzapft hast :s

    apt-cache search picamera
    python-picamera - Pure Python interface to the Raspberry Pi's camera module.
    python-picamera-docs - Documentation for the Python interface to the RPi's camera module.
    python3-picamera - Pure Python interface to the Raspberry Pi's camera module.
    root@362fd30:~#


    So ich lade mir gerade eine neue Jessie von der Seite:
    https://www.raspberrypi.org/downloads/raspbian/


    RASPBIAN JESSIE
    Full desktop image based on Debian Jessie
    Version:March 2016
    Release date:2016-03-18
    Kernel version:

    Werde die auf meine SD Karte schreiben und GANZ neu anfangen.

    Edited once, last by RaspPiHF (May 8, 2016 at 11:10 PM).

  • Chaos deshalb weil du in einem Atemzug von Jessie und Wheezy schreibst, "picam" probierst zu importieren und davon das Jessie bei dir nur Probleme machen würde - was ich nicht nachvollziehen kann und wenn das so fehlerhaft wäre würden hier weitaus mehr Threads deshalb sein, gibts aber nicht also wird das irgendwie an dir liegen....

    Wie gesagt: Python sucht in einem bestimmten Verzeichnis nach den Modulen. Entweder das aktuelle in dem man sich befindet, oder eins was man angibt, oder in dem der Umgebungsvariablen PYTHONPATH

    Wir halten also erst mal fest: Du willst Python2 verwenden.

    So aus Spaß könntest du ja mal probieren ein anderes Module zu importieren und gucken ob das denn funktioniert, zum Beispiel "sys" ...

    Führ mal bitte aus und poste die Ausgabe:

    Code
    python -c 'import sys; print sys.path'


    PS: Unten Rechts an deinem Beitrag gibt es einen "Bearbeiten" Button. Bitte lernen zu benutzen. Danke.

  • Ich danke dir für deine Hilfe......

    Habe jetzt Jessie installiert.


    RASPBIAN JESSIE
    Full desktop image based on Debian Jessie
    Version:March 2016
    Release date:2016-03-18
    Kernel version:4.1

    Habe es wie schon unter Jessie Lite gemacht.

    Code
    apt-get update
    apt-get install python-pip
    pip install picamera

    dann habe ich python aufgerufen

    pi@raspberrypi:~ $ python
    Python 2.7.9 (default, Mar 8 2015, 00:52:26)
    [GCC 4.9.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import picamera
    >>>

    Siehe da alles OK....

    WARUM DAS? das Jessie Lite war auch frisch.

    Edited once, last by RaspPiHF (May 8, 2016 at 11:54 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!