jgarff / rpi_ws281x

Userspace Raspberry Pi PWM library for WS281X LEDs
BSD 2-Clause "Simplified" License
1.78k stars 622 forks source link

Trying to install rpi_ws281x on Windows Pycharm #360

Open jmeyers123 opened 5 years ago

jmeyers123 commented 5 years ago

I'm trying to install rpi_ws281x on Windows 10 Pycharm IDE as I have a lot of coding to do and it will be easier to do all the coding there instead of the IDE on the Pi. When I enter the command pip3 install rpi_ws281x adafruit-circuitpython-neopixel in my Pycharm terminal, I get an error. The error is: running install running build running build_py error: [WinError 2] The system cannot find the file specified Compiling ws281x library...

Then it stops,. I'm using Python 3.7 and I was able to install the Adafruit libraries without any issue. I know it's a unique case, as most people are probably developing on the actually RPi itself. I was hoping someone had an idea on how to fix this. Thanks.

Gadgetoid commented 5 years ago

This is more a bug to file against the Python bindings here - https://github.com/rpi-ws281x/rpi-ws281x-python

However, since you're here the issue is that - when built from source - the Python library runs a call out to make in order to build the underlying ws281x library. The lack of a "make" command and probably of any sane build system on your Windows platform will prevent this from working.

Since there's absolutely no way a compiled version of this library would be remotely compatible with Windows I don't particularly see this as a bug. But I'm sympathetic to your use case. Possibly your only choice is to write a stub package that sits in place of rpi-ws281x-python but doesn't contain any of the C bindings. That may be a little labour intensive, though.