Sublime Forum

ST3.3095(64) Setup & Python Questions

#1

Hi All, new member here. I have a few questions. I will separate them out. Only been using ST for a week.

Using version 3095 (64) on Windows 8.1 (64).

First question, I see two items in the root of ST3 that I would like to know more about.

  • I see the python33.dll
    which shows as 3.3.3 in file details. I know it’s part of python, but would like to know how and where ST3 is utilizing it.

  • Next, python3.3.zip
    , yeah, the zip file in the root of ST3. Are those just wonderful examples for me to play with or are they somehow incorporated into ST3?

After those, I have these questions:

  • What version of python should I be installing to work smoothly with ST3 (3095)? I tried 3.3.3, didn’t go as planned.

  • Python specific question, after installing python and adding c:\pythonxx; to the path. What is the ‘proper’ way to setup the PYTHONPATH= environment variable? I see some point to the python/lib folder and I see some point it to their python/lib/site-packages folder. My site-packages folder is blank except for a README.txt file. As well, I see some people have multiple path locations within this variable.

Almost forgot my final question! … I have read too, that people are not installing the 64 bit version of python, because of the 32 bit libraries. What are some thoughts on that front?

Any help is good help.

Cheers.

np

0 Likes

#2

Python is used extensively inside of Sublime Text to implement various editor commands. It also is used to expose and API for plugins to extend the editor and add functionality.

python33.dll is the Windows shared library of the Python 3.3 runtime that Sublime Text 3 uses. python3.3.zip is the Python 3.3 standard library. Don’t edit files in the zip or things may start breaking.

When you say that you want to install Python to work with Sublime Text 3, what do you mean? Do you mean you would like to write plugins for Sublime Text 3? If so, installing Python separately will not benefit you. You must use the Python that is bundled with Sublime Text. You can interact with it via the Sublime Text Console.

If you want to install custom Python packages, it gets a bit more complicated since you can not use pip or easy_install with Sublime Text. If you are headed down this path and have questions, please open an issue on the Package Control issue tracker on GitHub. There is some functionality that helps with distributing pre-built shared libraries, however it can be somewhat time-consuming since you need to compile them for Windows x32, Windows x64, OS X x64, Linux x32 and Linux x64. Depending on the requirements of the python packages, it may also be necessary to distribute other shared library dependencies.

However, if you just want to write Python code and run it via Sublime Text, you can install any version of Python you want and use the Python build system in Sublime Text to execute it. You would just need to add the folder containing python.exe to your system’s PATH environment variable. Once Sublime Text is restarted, it should be able to find python.exe and execute it.

I hope this answers more questions than it prompts!

0 Likes

#3

Hi Will,

This is you? Slide 2, wbond

Thoroughly impressed and an honor to have your input and advise.

This is exactly what I am after, creating commands (plugins) and customizing ST3 to my daily editing needs.

Got it.

So basically, you’re saying that I can install Python 3.5.x 64 bit and I should not have any trouble with Sublime Texts built-in 3.3.3 interpreter?

After I have installed Python I have the following and most important question. :smile:

What is the best Python checker (for Sublime) for syntax, indenting, snippets, and auto-completion?

I appreciate your help in getting me started.

Cheers.

np

edit

Ok, so I’ve gone with this version via their web-installer:
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:16:59) [MSC v.1900 32 bit (Intel)] on win32

Which added this to my path: C:\st3;C:\Python35-32\Scripts;C:\Python35-32;

I’ve also manually added “c:\st3;” as I like to utilize the subl from the command line.

0 Likes

#4

Yes, The other Python is external.

Unless some plugin adds library paths from the other Python installation to ST’s Python’s sys.path. SublimeLinter does this for some Python-based linters, but it generally works fine.

I use SublimeLinter with SublimeLinter-flake8 for linting and recently started using Jedi for completions. Jedi works fairly well, but I have plans for improvements that I just didn’t get to yet. I don’t use snippets.

It seems you installed the 32 bit version after all. :wink: It will hardly matter though.

0 Likes

#5

Excellent!

So I installed the SublimeLinter via the Package Manager, easy enough.

Then I moved in on the SublimeLinter-flake8 piece. First, I used pip3.5 to install ‘flake8’. The wrapped exe’s from the flake8 pkg are now inside the python35_64/Scripts folder – which are in my path. Second, I installed the SublimeLinter-flake8 from the awesome Package Manager. :wink:

[hope I’m on track]

Now – onto Jedi.


Yeah, it was interesting, I used their main link for the 3.5 install and it installed that one. It didn’t give me a choice of 32 or 64.

So I just installed the 64 bit specific version.
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)] on win32


0 Likes