pixel_ring
pixel_ring copied to clipboard
unable to import pixel_ring
I have performed everything that is mentioned but still I am not able to import pixel_ring . I am sharing the error below
pi@raspberrypi:~/pixel_ring $ sudo python examples/respeaker_4mic_array.py
Traceback (most recent call last):
File "examples/respeaker_4mic_array.py", line 9, in
When using sudo
to run the example, you should install pixel_ring
with sudo
.
sudo pip install pixel-ring
Hello, I am trying to setup the respeaker 6-mic array to be used with snips. Microphone is working perfectly, but i have the same error when trying to activate the example to test pixel ring. when trying to install pixel-ring i have the following return:
Requirement already satisfied: pixel_ring in ./pixel_ring (0.1.0)
Requirement already satisfied: pyusb in /usr/local/lib/python3.5/dist-packages (from pixel_ring) (1.0.2)
Requirement already satisfied: spidev in /usr/local/lib/python3.5/dist-packages (from pixel_ring) (3.4)
Any help would be appreciated, Thank you.
Hi again, So i managed to get this to work using python3 instead of python when running the script.
I installed pixel-ring. I tried python3. But still getting the same error -
$ sudo python3 examples/respeaker_4mic_array.py
Traceback (most recent call last):
File "examples/respeaker_4mic_array.py", line 9, in <module>
from pixel_ring import pixel_ring
ModuleNotFoundError: No module named 'pixel_ring'
Hello,
I’m also having the same problem, if I download the pixel_ring package and load the examples from the folder everything works as expected. If I install the package using PIP while I can import pixel_ring when trying to use .wakeup() or other functions its says ‘module ‘ object has no attribute ...
Anyone find a fix yet ?
Hello,
I’m also having the same problem, if I download the pixel_ring package and load the examples from the folder everything works as expected. If I install the package using PIP while I can import pixel_ring when trying to use .wakeup() or other functions its says ‘module ‘ object has no attribute ...
Anyone find a fix yet ?
Ignore my question.. fixed. I was being silly and running the test program from a folder where it has a ‘pixel_ring’.. all working as expected now.
I installed pixel-ring. I tried python3. But still getting the same error -
$ sudo python3 examples/respeaker_4mic_array.py Traceback (most recent call last): File "examples/respeaker_4mic_array.py", line 9, in <module> from pixel_ring import pixel_ring ModuleNotFoundError: No module named 'pixel_ring'
Fixed this issue by removing everything and installing from scratch.
I have the same problem. Here is my output
pi@raspberrypi:~/pixel_ring $ python3 examples/usb_mic_array.py Traceback (most recent call last): File "examples/usb_mic_array.py", line 7, in <module> from pixel_ring import pixel_ring File "/home/pi/pixel_ring/pixel_ring/__init__.py", line 13, in <module> pixel_ring = PixelRing() File "/home/pi/pixel_ring/pixel_ring/apa102_pixel_ring.py", line 22, in __init__ self.dev = APA102(num_led=self.PIXELS_N) File "/home/pi/pixel_ring/pixel_ring/apa102.py", line 90, in __init__ self.spi.open(bus, device) # Open SPI port 0, slave device (CS) 1 FileNotFoundError: [Errno 2] No such file or directory
I also had such mistakes and I tried different options, but it turned out that I just had to follow this instruction and it worked for me. What did I do to make it work?
After installing the image, we update all packages
apt-get update && apt-get upgrade
Then we do as indicated in the documentation ReSpeaker_Core_v2.0
Play with GPIO This part will introduce how to use MRAA and UPM to control GPIO and Grove Socket on Respeaker Core v2.0.
Step 1. Update MRAA and UPM libraries to latest version At first, we need to install the latest MRAA and UPM packages.
sudo apt install python-mraa python-upm libmraa1 libupm1 mraa-tools
Next, we check the availability of pins, if there are no pins, then Pixel Ring will not work
mraa-gpio list
If there are pins, then we continue and install Pixel Ring, but before installing Pixel Ring, you need to install setuptools-scm
pip install setuptools-scm
We put Pixel Ring
git clone --depth 1 https://github.com/respeaker/pixel_ring.git
cd pixel_ring
pip install -U -e .
Run the python script for respeaker_v2_pixel_ring.py and admire the work of LED
python examples/respeaker_v2_pixel_ring.py