Sublime Forum

Sublime can't see python!

#1

Hi

I am using Sublime on Linux (LXLE), and am having trouble problems. The path to python on my set up is:

usr/bin/python3

To make the link with Sublime, I entered the following:

{
“cmd”: [“python3”, “-u”, “$file”],
“file_regex”: “^[ ]File “usr/bin/python3”, line ([0-9])*)”,
“selector”: “source.python”
}

and saved it in the directory that was suggested by sublime.

When I tried the print(sys.version) command I get the following message:

/usr/bin/python3: can’t find ’ main ’ module in ‘’
[Finished in 0.3s with exit code 1]
[cmd: [‘python3’, ‘-u’, ‘’]]
[dir: /opt/sublime_text]
[path:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin]

This is not the output which I thought I should be getting - can anyone help?

0 Likes

#2

you need to save your Python file (with your print(sys.version)) first

0 Likes

#3

Thanks - I have tried to save it but get a message saying that permission is denied - does that sound like a general problem with the Sublime installation or do you think it might be something else?

0 Likes

#4

It appears I was trying to save it to a directory that I couldn’t alter for some reason - all now working.

0 Likes