2

I am working on a project with some friends and we're facing a bit of a problem with our implementation of picamera.

We're trying to import cv2 and picamera at the start of the program (working with Python 3) and so far importing cv2 works just fine. When we're trying to import picamera it tells us this: ImportError: No module named picamera.

I made sure we installed picamera with "sudo apt-get install python-picamera" and with "...python3-picamera" and it tells me the modules are installed.

Does anyone know how to fix this problem?

Our goal is to take a photo every 0.5s and use it for our OpenCV-program, and we wanted to do that with picamera, and only that.

Might the problem be that our project is located on the Desktop and not in some kind of Project folder or something?

Thanks in advance.

linusg
  • 6,289
  • 4
  • 28
  • 78
anthrx
  • 161
  • 1
  • 3
  • 12
  • You may have a look on the latest two posts here: http://www.pyimagesearch.com/ – linusg May 13 '16 at 12:02
  • The Python dependencies that are installed by the script don't get installed with `sudo`. You could do `$ sudo apt-get install python-pip` `$ sudo pip install picamera` instead. – Nickil Maveli May 13 '16 at 12:11
  • @NickilMaveli thanks for trying to help, doesn't work still. It says everything is already downloaded, 0 downloaded,0 changed. The usual stuff. – anthrx May 13 '16 at 13:04

2 Answers2

3

I know this was posted a while ago, but for those who are experiencing the same issue, try this:

pip install "picamera[array]"

According to piimagesearch.com it's necessary to install the optional "array" sub-module for openCV to interface properly with picamera.

Squan Schmaan
  • 323
  • 1
  • 8
0

This should might help

sudo pip3 install picamera

I ran this on my desktop and something installed so it should work

if pip isn't installed you may have to run

sudo apt-get install python3-pip

sources:

How to install pip with Python 3?

Community
  • 1
  • 1
Hunter Jackson
  • 315
  • 2
  • 10