erfanjahanshahlo / node-red-contrib-pifacecad

A node red node for use PiFace CAD Board in node red.
0 stars 0 forks source link

Sorry, but I am missing something with the install. #1

Closed Just-another-pleb closed 4 years ago

Just-another-pleb commented 4 years ago

I admit I had to do some restoration on the RasPi's NR install to get it working, as it was/is a long time since I have used it.

Anyway, I installed it and a very simple flow where I injected "Hello" to the node.

I get this error:

Error: Command failed: python2 "/home/pi/.node-red/node_modules/node-red-contrib-pifacecad/pfc_lcd.py" HelloTraceback (most recent call last): File "/home/pi/.node-red/node_modules/node-red-contrib-pifacecad/pfc_lcd.py", line 1, in import pifacecadImportError: No module named pifacecad

I know I have made a mistake, but am too stupid to really get what that is. Thanks in advance. Screenshot from 2020-01-12 22-33-51

erfanjahanshahlo commented 4 years ago

you not installed the dependencies. for install dependencies run the below command in your raspberry pi terminal.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python{,3}-pifacecad

thanks.

Just-another-pleb commented 4 years ago

Thank you.

(But....)

This is what I get/see:

(See more at bottom)

pi@PIFACE:~ $ sudo apt-get install python{,3}-pifacecad
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pifacecad is already the newest version.
The following packages were automatically installed and are no longer required:
  ax25-node gyp libax25 libc-ares-dev libc-ares2 libjs-node-uuid libv8-3.14-dev libv8-3.14.5 libwebsockets3 openbsd-inetd pix-icons pix-plym-splash
  pixel-wallpaper
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  python-lirc python-pifacecad
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 517 kB of archives.
After this operation, 1,482 kB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian/ jessie/main python-lirc armhf 1.2.1-2 [26.9 kB]
Get:2 http://archive.raspberrypi.org/debian/ jessie/main python-pifacecad all 2.0.8-1 [490 kB]
Fetched 517 kB in 2s (231 kB/s)           
Selecting previously unselected package python-lirc.
(Reading database ... 190868 files and directories currently installed.)
Preparing to unpack .../python-lirc_1.2.1-2_armhf.deb ...
Unpacking python-lirc (1.2.1-2) ...
Selecting previously unselected package python-pifacecad.
Preparing to unpack .../python-pifacecad_2.0.8-1_all.deb ...
Unpacking python-pifacecad (2.0.8-1) ...
Setting up python-lirc (1.2.1-2) ...
Setting up python-pifacecad (2.0.8-1) ...
You need to configure lirc. For help, go to:
    http://piface.github.io/pifacecad/lirc.html#setting-up-the-infrared-receiver.
Please REBOOT before using PiFace Control and Display.
pi@PIFACE:~ $ exit

Reboot and same error.

Just noticed this too. I don't know if it is me, or what:

The error - first line:

Error: Command failed: python2

Yet I updated python3, yes?

erfanjahanshahlo commented 4 years ago

run below commands:

sudo aptitude install liblircclient-dev cython gcc python{,3}-setuptools python{,3}-dev
git clone https://github.com/tompreston/python-lirc.git
cd python-lirc/
make py2 && sudo python2 setup.py install
git clone https://github.com/piface/pifacecommon.git
cd pifacecommon/
sudo python2 setup.py install
git clone https://github.com/piface/pifacecad.git
cd pifacecad/
sudo python2 setup.py install
Just-another-pleb commented 4 years ago

I am so sorry I was forgetting to put the 1,1: in front of the text.

All working now.

Just-another-pleb commented 4 years ago

Just a P.S. on this topic: Suggestion: If there is no valid prefix (1,1: for example) make it default to position 1,1