Sublime Forum

Sublime version different in plugin than in console


I am using pycharm to develop a plugin in sublime text 4 and I added inside the following code:

print('Python version used: '+sys.version)

Resulting Python version used: 3.3.6 (default, Feb 25 2020, 13:56:07) [MSC v.1600 64 bit (AMD64)]

WHILE if I do this on the console



‘3.8.8 (default, Mar 10 2021, 13:30:47) [MSC v.1915 64 bit (AMD64)]’

1 Like


The sublime console runs in the plugin_host-3.8 environment, while plugins by default run in the plugin_host-3.3 environment. To make your plugin run in 3.8, create a file called .python-version with the content 3.8 in your package’s root folder.


1 Like