Skip to content

No Module Named adafruit_pixelbuf #134

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

Closed
polyphonic13 opened this issue Aug 14, 2022 · 3 comments · Fixed by #135
Closed

No Module Named adafruit_pixelbuf #134

polyphonic13 opened this issue Aug 14, 2022 · 3 comments · Fixed by #135

Comments

@polyphonic13
Copy link

polyphonic13 commented Aug 14, 2022

The adafruit_pixelbuf module is not found when running on a 2022 Raspberry Pi 4, with Raspbian OS.

Steps to Reproduce:

  1. Install with sudo pip3 install rpi_ws281x adafruit-circuitpython-neopixel
  2. Create python script (this was named "eye_lights01.py") that leverages NeoPixel with import neopixel (or from neopixel import * -- tried multiple demo scripts)
  3. Run script with sudo python3 eye_lights01.py

Expected Result: AdaFruit lights do lighting things
Actual Result: bug thrown from "neopixel.py" script:

  ...
  File "usr/local/lib/python3.9/dist-packages/neopixel.py", line 20 in <module>
    import adafruit_pixelbuf
ModuleNotFoundError: No module named 'adafruit_pixelbuf'
@Neradoc
Copy link

Neradoc commented Aug 14, 2022

There's a typo (there is no - in circuitpython) but I assume that's only here, since I can reproduce the issue.
Tested in a venv, it also did not install Blinka (which you probably already had).

python3 -m venv venv
source venv/bin/activate
pip install rpi_ws281x adafruit-circuitpython-neopixel
>>> import neopixel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/circuit/tests/venv/lib/python3.7/site-packages/neopixel.py", line 16, in <module>
    import board
ModuleNotFoundError: No module named 'board'
>>> 

You can install the missing dependency manually:

sudo pip3 install adafruit-circuitpython-pixelbuf

@polyphonic13
Copy link
Author

Thank you! adafruit-circuitpython-pixelbuf was the dependency name that I couldn't figured out. I'd tried adafruit-pixelbuf and pixelbuf with no luck.

There's a typo (there is no - in circuitpython)
Correct. That was only in this post. Edited original to correct.

@tekktrik
Copy link
Member

This is due to an issue with pyproject.toml not including requirements.txt during the build/upload step, I believe. This should be fixed with #135 which will make sure those files are added when the source and built distributions are created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants