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?

2
  • wich sublime text? 2 or 3? Commented May 30, 2017 at 14:02
  • sublime text 3..... Commented May 30, 2017 at 14:03

2 Answers 2

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

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

4 Comments

how did you find that was the problem?
I have installed and removed python 3 through Package Control more than once and it didn't worked, so i removed it and made new build with inserting path manually.
Well your solution is ok, +1 for it ;)
i have checked before posting that my PATH variables are right, but it will be useful in many cases, sure i will vote for it
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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.