Ask Your Question
0

Permission denied when importing neopixel through opencv 3.1.0 [closed]

asked 2018-02-01 01:46:26 -0600

Hi I installed neopixel libraries using adafruit on my RPi 3 using the following link http://frederickvandenbosch.be/?p=1014

With this neopixels work perfectly fine without importing cv2 as neopixel require you to be the root user to access gpio ports and /dev/mem.

But, on combining this code with my code that imports cv2, I am unable to import it. Since opencv cannot work as a root user. Now, the problem being neopixel requires a root user access while opencv does not.

On executing my code without sudo, (python sample.py )I get Can't open /dev/mem: Permission denied

while on executing is with sudo (sudo python example.py) I get ImportError: No module names cv2

Please give me suggestions on how this issue be solved.

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by berak
close date 2018-03-23 00:20:30.505251

Comments

entirely unrelated to opencv

berak gravatar imageberak ( 2018-03-23 00:21:15 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-03-22 21:27:52 -0600

supra56 gravatar image

The are some reports that this library does not work with the new Raspberry Pi 2. Be warned that the library is not confirmed to work with the Pi 2 hardware yet--only the first generation Pi is known to work.

edit flag offensive delete link more

Comments

I can say that this is rubbish ... have several newly bought raspberry pi's that work just fine with latest master.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-03-23 05:40:41 -0600 )edit

@StevenPuttemans. I suggest you can vote me OUT

supra56 gravatar imagesupra56 ( 2018-03-23 06:58:54 -0600 )edit

Why would I vote you out? In some cases your replies actually make sence, but in this case, it simply does not, because I can show that the latest pi's have perfect opencv support?

StevenPuttemans gravatar imageStevenPuttemans ( 2018-03-23 09:03:00 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-02-01 01:46:26 -0600

Seen: 351 times

Last updated: Mar 22 '18