# Pi2go2 - python installation fails

**URL:** <https://forums.pimoroni.com/t/pi2go2-python-installation-fails/21708>\
**Category:** Support\
**Created:** [March 13, 2023, 4:48pm UTC](https://forums.pimoroni.com/t/pi2go2-python-installation-fails/21708 "2023-03-13T16:48:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pi2go2](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@pi2go2](https://forums.pimoroni.com/u/pi2go2)\
**Post date:** [March 13, 2023, 4:48pm UTC](https://forums.pimoroni.com/t/pi2go2-python-installation-fails/21708/1 "2023-03-13T16:48:56Z")

</div>

Hi everybody!  
I’m andre from germany and want to use the pi2go2 in my school. But i didn’t get the python interface working. I must work with an older raspbean OS, to get the scratch-interface work. I use 2019-04-08-raspbian-stretch.zip.  
The installing instructions you find here: [https://4tronix.co.uk/blog/?p=2045](https://4tronix.co.uk/blog/?p=2045)  
But if i use the recommended command curl -sS [https://get.pimoroni.com/unicornhat](https://get.pimoroni.com/unicornhat) bash, the extension vom david doesn’t work maybe because the unicornhat extension for python3 is getting installed, but i need the older one, which matches with python2 and the older raspbian version. So, is there an similar page for the unicornhat which older versions or do you have any other ideas, how i can fix the problem? My goal is to use davids pi2go2 with python - with python2 or python3 doesn’t really matter. python3 would be fine. :)  
For example: If i start the python-file ledTest.py, i got the exception:  
ImportError: No module named rpi\_ws281x  
Thx for your attention!

---

<div class="post-metadata">

**Author:** ![pi2go2](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@pi2go2](https://forums.pimoroni.com/u/pi2go2)\
**Post date:** [March 13, 2023, 5:27pm UTC](https://forums.pimoroni.com/t/pi2go2-python-installation-fails/21708/2 "2023-03-13T17:27:25Z")

</div>

Fix: sudo pip install rpi\_ws281

After that everything works. I wonder why. Maybe david worked at the files…? :)

One problem is left. To start the example-files rainbow.py or ledTest.py, i have to use sudo. So one little problem is left. python says

pi@raspberrypi:~/pi2go2 $ python ledTest.py  
Can’t open /dev/mem: Permission denied  
Traceback (most recent call last):  
File “ledTest.py”, line 13, in   
pi2go2.init(40)  
File “/home/pi/pi2go2/pi2go2.py”, line 172, in init  
leds.begin()  
File “/usr/local/lib/python2.7/dist-packages/rpi\_ws281x/rpi\_ws281x.py”, line 131, in begin  
raise RuntimeError(‘ws2811\_init failed with code {0} ({1})’.format(resp, str\_resp))  
RuntimeError: ws2811\_init failed with code -5 (mmap() failed)  
Speicherzugriffsfehler  
pi@raspberrypi:~/pi2go2 $ sudo python ledTest.py

Thx again! I love the pi2go2 :D

---

<div class="post-metadata">

**Author:** ![hel](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/hel/32/6075_2.png) [@hel](https://forums.pimoroni.com/u/hel)\
**Post date:** [March 14, 2023, 4:10pm UTC](https://forums.pimoroni.com/t/pi2go2-python-installation-fails/21708/3 "2023-03-14T16:10:08Z")

</div>

I’ve not had anything to do with this board, but I believe `sudo` is required as doing things with WS2812/Neopixels over the a Pi’s GPIO needs elevated hardware permissions (that’s the case with our Unicorn HAT anyway!)
