2

I am getting an error "

[Finished in 0.0s with exit code 127] [shell_cmd: python -u "/bin/apturl-gtk"] [dir: /usr/bin] [path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin]bash: python: command not found

I have python 3.7 installed, and am running Ubuntu. What do I do?

1
  • 2
    What is the output of which python? Commented Sep 27, 2019 at 3:39

3 Answers 3

9

i am assuming the problem resembels the below image and the solution for ubuntu: go to tools> build system> new build system, then put the below code to that popped up file and save it,put the location of python installation instead of "python3" if you use ubuntu then no need to add the whole path(as it is installed by default)just write as below { "cmd": ["python3", "-i", "-u", "$file"], "file_regex": "^[ ]File \"(...?)\", line ([0-9]*)", "selector": "source.python" } after saving the file now go to tools>build system then python3 will be noticeable and check the box of python3.Now save any file with py extension in sublime containing these two lines of python code to test the version import sys and then print(sys.version) and run by going tools>build.Hope it will work as it worked for me.thanksenter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

Since Ubuntu Bionic, Python 2 is no longer installed by default.

Besides, https://www.python.org/dev/peps/pep-0394/ now discourages the use of unqualified python (by leaving it up to distro maintainers whether to provide it at all and which version to link it to) to ease up the migration to Py3, so you can raise that as an issue with the developers of the program.

Comments

0

Try below commands if you are using the Ubuntu 18.04 version

sudo apt update
sudo apt -y upgrade

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.