Greetings,
I'm working with a raspberrypi running Minibian. Minibian is a lighter, more pain in the ass, version of Raspbian. I can't run a python script by simply adding the normal shebang (#!/usr/bin/env python).
You're saying you know the solution. You put forth enough effort to post, but refuse to merely state which docs and clauses something like could be researched. You sound full of it, like someone with 2 posts.
Off topic: Op you've just reminded me of this oldie with that title:
On topic: Not sure, have you tried looking it up stackoverflow yet? I'm sure someone on there had this exact same issue, I suggest going there and seeking help if you don't get any by today.
(Feb 10, 2017 04:11 PM)ze-slade Wrote: Off topic: Op you've just reminded me of this oldie with that title:
On topic: Not sure, have you tried looking it up stackoverflow yet? I'm sure someone on there had this exact same issue, I suggest going there and seeking help if you don't get any by today.
I know many don't, but I researched before creating this thread. There are mentions of the system PATH variable, where python is, how the script is ran, and the executable permission bit. Even making sure the first line is the 'shebang.' If you examine the code I posted, those Linux commands should indicate all those suggestion are not the issue.
Perhaps it is just Minibian being shit and I should use another OS. Just the SD card is only 4GB so minibian fits on it. You can't fit Raspbian on a 4GB drive. I do have 16 GB SD cards! Just thought I'd ask because I'm invested into that install at this point. It would take a day to document and reconfigure a new install.
(Feb 11, 2017 09:37 PM)captainspalding Wrote: Did you verify that /usr/bin/env exists?
I get 'evn' is just a convenience thing. Previously. I tried simply using the shebang '#!/usr/bin/python', the output of 'which python', and still didn't work.
Nonetheless, I tried to boot to check env, but I'm getting SSH connection refused now. The RPI is an remote server in a fixed location with wires connected to its GPIO so I can't easily move it to a TV to check the problem. . . Last straw, I'm so done with this! 😕 It has gotten to that point where it is more hassle than it it worth.
Code
dev@DESKTOP2:~/Documents/random$ ssh -vvv [email protected]
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "192.168.1.172" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.1.172 [192.168.1.172] port 22.
debug1: connect to address 192.168.1.172 port 22: Connection refused
ssh: connect to host 192.168.1.172 port 22: Connection refused
dev@DESKTOP2:~/Documents/random$ ping 192.168.1.172
PING 192.168.1.172 (192.168.1.172) 56(84) bytes of data.
64 bytes from 192.168.1.172: icmp_seq=1 ttl=64 time=0.390 ms
64 bytes from 192.168.1.172: icmp_seq=2 ttl=64 time=0.346 ms
64 bytes from 192.168.1.172: icmp_seq=3 ttl=64 time=0.353 ms
^C
--- 192.168.1.172 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.346/0.363/0.390/0.019 ms
dev@DESKTOP2:~/Documents/random$ nmap 192.168.1.172
Starting Nmap 7.01 ( https://nmap.org ) at 2017-02-12 00:00 EST
Nmap scan report for 192.168.1.172
Host is up (0.0096s latency).
All 1000 scanned ports on 192.168.1.172 are closed
Nmap done: 1 IP address (1 host up) scanned in 0.24 seconds
dev@DESKTOP2:~/Documents/random$
(Feb 11, 2017 10:03 PM)datguy.dev Wrote: I get 'evn' is just a convenience thing. Previously. I tried simply using the shebang '#!/usr/bin/python', the output of 'which python', and still didn't work.
Nonetheless, I tried to boot to check env, but I'm getting SSH connection refused now. The RPI is an remote server in a fixed location with wires connected to its GPIO so I can't easily move it to a TV to check the problem. . . Last straw, I'm so done with this! 😕 It has gotten to that point where it is more hassle than it it worth.
Code
dev@DESKTOP2:~/Documents/random$ ssh -vvv [email protected]
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "192.168.1.172" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.1.172 [192.168.1.172] port 22.
debug1: connect to address 192.168.1.172 port 22: Connection refused
ssh: connect to host 192.168.1.172 port 22: Connection refused
dev@DESKTOP2:~/Documents/random$ ping 192.168.1.172
PING 192.168.1.172 (192.168.1.172) 56(84) bytes of data.
64 bytes from 192.168.1.172: icmp_seq=1 ttl=64 time=0.390 ms
64 bytes from 192.168.1.172: icmp_seq=2 ttl=64 time=0.346 ms
64 bytes from 192.168.1.172: icmp_seq=3 ttl=64 time=0.353 ms
^C
--- 192.168.1.172 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.346/0.363/0.390/0.019 ms
dev@DESKTOP2:~/Documents/random$ nmap 192.168.1.172
Starting Nmap 7.01 ( https://nmap.org ) at 2017-02-12 00:00 EST
Nmap scan report for 192.168.1.172
Host is up (0.0096s latency).
All 1000 scanned ports on 192.168.1.172 are closed
Nmap done: 1 IP address (1 host up) scanned in 0.24 seconds
dev@DESKTOP2:~/Documents/random$
Thanks for trying to help everyone! 👍
Looks like your SSH daemon stopped. That sucks 😖
My thought was that maybe minibian doesn't come with /usr/bin/env, not sure. If you get it working again, since it seems like it's running like an embedded device anyway, try using the less interoperable /usr/bin/python.
(Feb 13, 2017 04:38 PM)captainspalding Wrote: Looks like your SSH daemon stopped. That sucks 😖
My thought was that maybe minibian doesn't come with /usr/bin/env, not sure. If you get it working again, since it seems like it's running like an embedded device anyway, try using the less interoperable /usr/bin/python.
I tried that as in my last post. I had no idea what else it could be? Nonetheless, Raspbian negated the problem. Usually I wouldn't complain about having to type python before the script. But I lose all trust when I don't know what the issue is and the python project is complex.
Honestly, I should've switched earlier as I no longer need sudo for serial communications as well.