P
P
pixal2015-10-19 14:20:18
Python
pixal, 2015-10-19 14:20:18

Why is Raspberry pi ignoring #!/usr/bin/env python in a Python script?

Or rather, he writes that an unknown team. Tried
#!/usr/bin/env python
AND
#!/usr/bin/env python3
AND
#!/usr/bin/python
AND
#!/usr/bin/python3
And if I run python3 script.py runs fine.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Swartalf, 2015-10-19
@Swartalf

and the utility itself is /usr/bin/env on this path? Are the permissions correct?

I
Iurii, 2015-10-19
@Mistifiks

Perhaps your python is in a different directory?
This is how you find out which address is substituted when executing the command python3 script.py:
Look at the contents of the folder from which the interpreter cannot be launched (and check the file permissions, if any):
ls -la /usr/bin

B
Bojczuk, 2015-10-19
@Bojczuk

Try to run like this, in the directory with the script:./script.py

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question