0% found this document useful (0 votes)
66 views3 pages

C++ - Installing Python Module - SpiDev - Stack Overflow

The document is a Stack Overflow question asking how to install the Python SpiDev module on a Raspberry Pi running Windows 10 IoT Core. The asker has tried various methods of installing SpiDev using pip and from source, but receives errors indicating the C compiler cannot find the source file. One response explains that SpiDev likely will not work on Windows and suggests writing code in chunks using IPython on the Pi and transferring to an IDE.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
66 views3 pages

C++ - Installing Python Module - SpiDev - Stack Overflow

The document is a Stack Overflow question asking how to install the Python SpiDev module on a Raspberry Pi running Windows 10 IoT Core. The asker has tried various methods of installing SpiDev using pip and from source, but receives errors indicating the C compiler cannot find the source file. One response explains that SpiDev likely will not work on Windows and suggests writing code in chunks using IPython on the Pi and transferring to an IDE.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 3

c++ - Installing Python Module - SpiDev - Stack Overflow https://stackoverflow.com/questions/33033189/installing-python-modul...

Installing Python Module - SpiDev


Asked 7 years, 1 month ago Modified 10 months ago Viewed 5k times

Join Stack Overflow to find the best answer to your technical question, help others answer theirs.

Sign up with email Sign up with Google Sign up with GitHub Sign up with Facebook

1 of 3 11/10/2022, 1:09 PM
c++ - Installing Python Module - SpiDev - Stack Overflow https://stackoverflow.com/questions/33033189/installing-python-modul...

I am working on a project that involves programming the raspberry pi windows 10 IoT core.
I'm programming it in python, however I need to install the python module SpiDev. I have tried
4 various ways all that return the same error as shown below. I have installed Visual C++ 2010
(Correct version for Python 3.4) as the compiler and I work in Visual Studio Enterprise 2015.
From a command prompt I have tried installing with the following:

C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\jedho


\\Downloads\\py-spidev-master\\py-spidev-master\\setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'),
__file__, 'exec'))" install --record C:\Users\jedho\install-record.txt --single-
version-externally-managed --compile

with

C:\Python34\python.exe C:\Users\jedho\Downloads\py-spidev-master\py-spidev-master
\setup.py install

Which contains the directory I downloaded SpiDev from

and via PIP with

C:\Python34\Scripts\pip3.exe install spidev

But all return the same error

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD


/W3 /GS- /DNDEBUG -I/usr/src/linux/include -IC:\Python34\include -IC:\Python34
\include /Tcinstall_spidev_module_EDIT.c /Fobuild\temp.win32-3.4\Release
\install_spidev_module_EDIT.obj install_spidev_module_EDIT.c c1 : fatal error C1083:
Cannot open source file: 'install_spidev_module_EDIT.c': No such file or directory error:
command 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe' failed
with exit status 2

python c++ visual-studio-2010 module

Share Improve this question edited Jan 6 at 14:13 asked Oct 9, 2015 at 8:12
Follow bad_coder Jed Hodson
9,816 20 39 64 43 1 3

Join Stack Overflow to find the best answer to your technical question, help others answer theirs.

Same
Sign up with problem happening
email in Python
Sign up with Google2.7 for Windows
Sign up– Mark Lapasa Sep 11,Sign
with GitHub 2016up
atwith
17:33Facebook

2 of 3 11/10/2022, 1:09 PM
c++ - Installing Python Module - SpiDev - Stack Overflow https://stackoverflow.com/questions/33033189/installing-python-modul...

1 Answer Sorted by: Highest score (default)

The error happens since some software is platform-oriented. It seems like Windows does not
support native RaspberryPI SpiDev.
1
How to emulate/mock functionality on different platform. Good explanation with wrapping
example.

SpiDev which not likely work with Windows.

As temporary solution, the code can be written as small chunks in iPython on dedicated device
and transferred to your Windows-based IDE.

Share Improve this answer Follow answered Aug 16, 2017 at 18:24
Ivy Growing
2,100 2 15 19

Join Stack Overflow to find the best answer to your technical question, help others answer theirs.

Sign up with email Sign up with Google Sign up with GitHub Sign up with Facebook

3 of 3 11/10/2022, 1:09 PM

You might also like