Answer the question
In order to leave comments, you need to log in
Why doesn't running a script in Sublime text 3 work?
If you use import of any module, pressing ctrl+b results in the error No module named ...
And so with any module, when you run simple programs like print('Hello world') everything works.
If you run the program through the command line, everything works.
What could be the problem?
Answer the question
In order to leave comments, you need to log in
1. Open Sublime Text -> Tools -> Build System -> New Build System
2. Paste the following lines into the opened file to make it look like this:
{
"cmd": ["python3", "-i", "-u" , "$file"],
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)",
"selector": "source.python"
}
3. We save the file with the name python3.sublime-build and do not change the path suggested by the editor
4. Go and check the box Tools -> Build system -> python3
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question