-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SWIG version dependency #115
Comments
What commands did you use to build? With swig 3.0.10 on archlinux (RPI B+) i used the following commands and it seems to work alright. Though i did have to add some symlinks into the examples folder for the generated files, but i suspect thats normal. $ swig -python rpi_ws281x.i |
Unfortunately I have blown out that OS and changed to Raspian so I only have my repos to refer to but I script the entire RPI build. Essentially it is: I didn't pass any command line options (other than install) or create any symlinks. When I was installing swig from apt I was doing simply apt-get install swig which installed both swig and swig3.0. After changing this to apt-get install swig2.0 it resolved the issue. Let me know if you need anything else. |
Tried it like that and strandtest.py worked on my system, well apart from crashing after a while that is. But before that it did light leds for a while so thats probably unrelated.
|
+1 I can confirm the first issue on Ubuntu Mate as well. It works with swig2.0 but not with 3.0. |
Out of interest, try: https://github.com/rpi-ws281x/rpi-ws281x-python I ship the compiled SWIG bindings with the library to avoid any dependency upon SWIG for users who just want to use the library. Or you can try: "sudo pip install rpi_ws821x" |
I'm using a RPI 3 running Ubuntu Mate 16.04 and installed the library. Everything built fine and lowlevel.py ran fine but strandtest.py and others generated an error. The error was:
File "strandtest.py", line 8, in
from neopixel import *
File "build/bdist.linux-armv7l/egg/neopixel.py", line 50, in
File "build/bdist.linux-armv7l/egg/neopixel.py", line 52, in Adafruit_NeoPixel
AttributeError: 'module' object has no attribute 'WS2811_STRIP_RGB'
After tracking through the code, etc. I was looking into the items imported referencing SWIG. It turns out that when I installed SWIG from apt, it installed SWIG and SWIG 3.0. I was able to resolve my problem by installing SWIG 2.0.
If you are having this error, I suggest running:
apt-get install swig2.0
If others can reproduce this, not sure what changes happen with swig3.0 or if the readme may need to be updated.
The text was updated successfully, but these errors were encountered: