Sublime Text 3 is developed in Python 3.3 and all plugins run via its internal Python environment (3.3). Now, I want to use packages that are compatible with Python 3.6+ in my Sublime plugin. How can I overcome this conflict?
1 Answers
Sublime Text 4 is in "discreet beta" right now, only for registered users. It now comes with two versions of plugin_host
, one running Python 3.3 and the other using Python 3.8 - you can read about the new API Environments in the dev docs. Briefly, if you want your plugin to run 3.8, create a .python-version
file in the root of your package containing the text 3.8
. Anything else, no text at all, or no file at all means your plugin will run with 3.3.
You can find the dev builds (currently) on the Sublime Text Discord Server under #announcements
. However, if you are going to use the dev builds (which are quite stable, BTW), please make sure you're always upgraded to the latest one, and you post bugs/feedback to aid in the development effort. I think a true public beta (still only for registered users) will be forthcoming fairly soon.

- 100,794
- 21
- 241
- 231
-
Thanks. How can I register to download the Beta version? Can you provide a link? – C2121 Feb 23 '21 at 14:09
-
"Registered" means you have [purchased a license](https://www.sublimehq.com/store/text) - the beta is not available for free evaluation. [Here](https://discord.gg/D43Pecu) is the invite to the Discord server, which can also be found in the ST Forum by googling "sublime text discord" or something similar :) – MattDMo Feb 23 '21 at 22:05
-
Thanks. I costs $80. I did it, but unfortunately there are some bugs that cause problems. ex, sometimes `exec` errors occurs. Also, I added the python version file but the plugin also is not working on ST4. There is no output in the terminal! – C2121 Feb 23 '21 at 22:42
-
FYI, the full docs for the dev builds are at https://sublimetext.com/docs/index.html, so check out the section on build systems to see if they noted any changes to `exec`. As far as your plugin not working, it's probably time to start sprinkling in `print()`s and start monitoring the console... – MattDMo Feb 24 '21 at 18:09