BrickPi module in Windows 10


#1

Hello,
I am trying to install the python BrickPi module in windows machine using “pip”. The installation is giving the error :
“spidev_module.c(25) : fatal error C1083: Cannot open include file: ‘linux/spi/spidev.h’: No such file or directory”
“error: command ‘C:\Users\halder\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe’ failed with exit status 2”.
is BrickPi available for linux based machine only? Please help.


#2

Are you talking about widows 10 IOT?


#3

hi, I was trying to write the python code in my Windows 10 PC and transfer the code to raspberry and run it there. I am using PyCharm as the IDE in my PC and I tried to install BrickPi using pip in my PC.
Also, there is no problem with running BrickPi codes in raspberry which is using raspbian.


#5

Hi @palashhalder1988,

Just hoping in for a small addition / clarification,

The BrickPi's Python module isn’t supposed to be working on a Windows machine, but only on a Raspberry Pi device.

For instance, one of the modules we use is called fcntl and it’s a linux-specific module.

That simply won’t work unless you create mock modules. Just google mock modules python and research a little bit into this subject.

Thank you!


#7

Hello @palashhalder1988, I’m just hopping in here. It seems that you were going to try to write Python code on your Win10 PC and move that code over to your Raspberry Pi running Raspbian for Robots or another Linux Distro.

As everyone pointed out, the BrickPi3 python software won’t run on Win10; there are a few modules you need installed that won’t install on the windows machine.

However, if you’re looking for a convenient way to edit your code on your Win10 machine and test it, we recommend trying out Notepad++. The interface highlights python code syntax; it also has an FTP plugin so you can work directly on files that are on the Pi. When you go to execute the python file, you’ll need to do that in a terminal program such as Putty.

Hope that helps!