0

I want to work in python 3.6 on sublime 3, I have been working on python 2.7 and it works very well, when i have installed python 3.6, it works fine on python 3.6 shell and i have set environment paths :-

C:\Python36\Scripts\;C:\Python36\;

as it created on my setup file.. I have installed python 3 on sublime as python 2.7 .. when I try to execute python3 file it gives me

'py' is not recognized as an internal or external command` 

I have rebooted and nothing happened.

is there's something im missing? what should i double check on sublime?

Dadep
  • 2,796
  • 5
  • 27
  • 40

2 Answers2

2

It turns that my PATH was right, when i used Package Control to setup python 3 it didn't work, i had to create new build and write on it:-

{
    "cmd": ["c:/Python36/python.exe", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
}

it works now

1

It looks like your PATH isn't setup correctly. Sometimes this happens when you install Python in a specific folder instead of the default C:\Python folder (e.g. C:\Python36)

To setup your PATH, right click on 'My Computer' and click 'Properties', then in the 'System Properties' click on the 'Advanced' tab. In the 'System variables' section, you'll see a variable called 'Path'. Now add where you installed Python to that list (additional items are appended with a semicolon).

For example, if you installed on C:\Program Files\Python36 then you would add ";C:\Program Files\Python36" to your PATH variable.

check this answer

developer_hatch
  • 15,898
  • 3
  • 42
  • 75