I have been working with Python for a short while and have created some programs, Im just setting up a third Raspberry Pi with Raspian Jessie. On the other two Pis I didn't run into an issue, but on this one I can't get my Python script to execute the same way.
The first line of the file has the shebang:
#!/usr/bin/env python
I git cloned the repo and went to the directory and did:
chmod +x script.py
but when I try to ./script.py
it doesnt work. From the Desktop it asks if the file should be executed and when I choose execute in terminal it closes and does not execute. I tried placing script.py in
/usr/local/bin
but that has no effect. If I do:
python script.py
it works fine.
The only difference between the Pis is the first two are headless and this new one has the Pixel desktop environment.