Answer the question
In order to leave comments, you need to log in
I run a python script and it throws an error. Everything is fine on the computer, how to fix it?
[email protected]:/py# ./vk.py
./vk.py: line 1: import: command not found
./vk.py: line 2: $'\r': command not found
./vk.py: line 3: $'\r': command not found
./vk.py: line 4: from: command not found
./vk.py: line 5: $'\r': command not found
./vk.py: line 8: syntax error near unexpected token `('
./vk.py: line 8: `response = urllib.request.urlopen(' https://api.vk.com/method/video.get?owner_id=84627. .. '+access_token)
'
[email protected]:/py#
Answer the question
In order to leave comments, you need to log in
Either run as
Or write sha-bang, i.e. in the very first line
If the script is written for the third version of python, in both cases replace python with python3.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question