SPI-Py icon indicating copy to clipboard operation
SPI-Py copied to clipboard

Warning on Run sudo python setup.py install

Open rey1024 opened this issue 11 years ago • 3 comments

I Follow this instruction http://geraintw.blogspot.com/2014/01/rfid-and-raspberry-pi.html.

i run this script on Raspberry Pi B+ (raspbian). when i run :+1: sudo python setup.py install running install running build running build_ext building 'spi' extension creating build creating build/temp.linux-armv6l-2.7 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c spi.c -o build/temp.linux-armv6l-2.7/spi.o spi.c:197:2: warning: initialization from incompatible pointer type [enabled by default] spi.c:197:2: warning: (near initialization for âSpiMethods[0].ml_methâ) [enabled by default] creating build/lib.linux-armv6l-2.7 gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-armv6l-2.7/spi.o -o build/lib.linux-armv6l-2.7/spi.so running install_lib copying build/lib.linux-armv6l-2.7/spi.so -> /usr/local/lib/python2.7/dist-packages running install_egg_info Removing /usr/local/lib/python2.7/dist-packages/SPI_Py-1.0.egg-info Writing /usr/local/lib/python2.7/dist-packages/SPI_Py-1.0.egg-info

but when i run sudo python setup.py install again : running install running build running build_ext running install_lib copying build/lib.linux-armv6l-2.7/spi.so -> /usr/local/lib/python2.7/dist-packages running install_egg_info Removing /usr/local/lib/python2.7/dist-packages/SPI_Py-1.0.egg-info Writing /usr/local/lib/python2.7/dist-packages/SPI_Py-1.0.egg-info

but when i test with python MFRC522-python/Read.py, cannot detect tag

rey1024 avatar Oct 17 '14 09:10 rey1024

So think I had the same but after restart it worked like your second attempt.

I just cant get it to run the Read.py

pi@raspberrypi:~/gr_programs/RFID/SPI-Py/MFRC522-python $ sudo python read.py can't open device: No such file or directory pi@raspberrypi:~/gr_programs/RFID/SPI-Py/MFRC522-python $ sudo python Read.py python: can't open file 'Read.py': [Errno 2] No such file or directory

Looks like a shortfall in my Python understanding but I cant see what Im doing wrong

Grahamrich1 avatar Jun 23 '17 15:06 Grahamrich1

rey1024, Do we not need to use the Sudo command to allow us supervisory access to the GOIP pins to be able to read the RFID content?

Grahamrich1 avatar Jun 23 '17 15:06 Grahamrich1

I have the same issue, any fix guys?

ncoshea avatar Mar 20 '18 14:03 ncoshea