Sublime Text 2 For Python

broken image


  1. Python Sublime Text 3
  2. Sublime Text Python Input
  3. Configure Sublime Text For Python

Question or issue on macOS:

Sublime Text plugin to bind a key (for example the end key) to move/extend the cursor/selection(s) to the end of the line, or to before the specified scope (i.e. A comment) at the end of the line Python MIT 0 2 1 0 Updated Nov 24, 2019. Sublime Text is a cross-platform text editor for code, markup, and prose. Download and Install Sublime Text. To use your Anaconda installation with Sublime Text. Sublime Text is a commonly-used text editor used to write Python code. Sublime Text's slick user interface along with its numerous extensions for syntax highlighting, source file finding and analyzing code metrics make the editor more accessible to new programmers than some other applications like Vim and Emacs. GitHub is where people build software. More than 50 million people use GitHub to discover, fork, and contribute to over 100 million projects.

I just want to direct a Sublime Text 2 Package (SublimeREPL) to the correct python installation–at the moment, it's picking up the wrong one.

The story here is familiar to Mac users. The Mac OS comes includes a python install which it uses for various OS stuff for which python is required. Like many others, i prefer not to use this system python (which resides in /System/Library/…) becasue it is usually out of date and of course it's not a good idea to update it–it is a working python install used by the Mac OS, and updating risks causing those OS tasks that depend on that install to break.

But that's the version picked up by the package SublimeREPL:

The version i use for development (and which is installed in /Library/Frameworks/ and symlinked to /usr/local/bin) is:

Sublime 2 Text is picking up the correct version elsewhere, except when using the SublimeREPL Package so there must be a setting in one of the config files in that Package that will let me direct SublimeREPL to the correct python.

But i can't find it.

It seems that i have exhausted all plausible options, which, looking through my /Sublime Text 2/Packages/ directory must reside in either:

Or

In fact, i added the following each of the three JSON files above, with no effect:

How to solve this problem?

Solution no. 1:

If you want to use repl_open you could edit the cmd parameter in the config. I am using Ubuntu and it is located in:

/home/stav/.config/sublime-text-2/Packages/SublimeREPL/config/Python/Main.sublime-menu

Python Sublime Text 3

Python

Solution no. 2:

Sublime text 3 python setup

Solution no. 2:

@Steven Almeroth solution did not work for me.

Instead a changed a parameter in the following directory: packages/Python/Python.sublime-build

The following code is available there. Simple change the cmd to the directory where your brew of python is located.

Solution no. 3:

From my experience it's simpler to fix a mess around versions patching environment variables specifically for Sublime Text 2 process

The only straight and dumb solution I've found – hack environment variables for Sublime Text 2. This can be done creating .py file with any name in folder:

Sublime Text Python Input

Just add paths you need there and all plugins will use those settings.
See more information in Rob Dodson's blog post: http://robdodson.me/blog/2012/05/14/hacking-the-path-variable-in-sublime-text/ Cad for linux ubuntu.

Example .py:

Configure Sublime Text For Python

Hope this helps!





broken image