Sublime Forum

Changing the Console's version of Python

#1

I noticed that the console in sublime is using a zip of python 2.6
How do I change it so the console uses a different version of python like Python 3.2.2?

0 Likes

#2

This can’t be changed, it’s an integral part of the editor.

0 Likes

#3

Hmmm… Well then how about a simple way to press a button and run the code in sublime text in the python.exe that is in the windows path variables? Which for me is the 3.X version.

0 Likes

#4

The default build system for Python should do that for you. Make sure it’s the selected build system and press F7. If you want to see the actual console, you will need to create your own build system, though, and use that instead.

sublimetext.info/docs/en/core/build_systems.html

0 Likes

#5

Thanks, I think I’ll do the latter

0 Likes

#6

An quick option:

pythonc.bat

start cmd /c "python.exe -u %1 && pause"

Python Console Build System.sublime-build

{ "cmd": "C:\\users\\<YOU>\\path\\to\\pythonc.bat", "$file"] }

It isn’t perfect, but it’s simpler than writing a custom build command…

0 Likes

#7

It’s worth noting, however, that you’ll lose the ability to navigate errors with F4, because you aren’t capturing any error info.

0 Likes

#8

you can just do jerryrigging debugging, and by that I mean taking a screenshot before the cmd closes and viewing the error in paint :wink:

0 Likes

#9

Haha… I’ve done that!

0 Likes