Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

migrate to Sublime Text 3 #345

Closed
wants to merge 3 commits into from

2 participants

@gfreezy

Replace pep8 and pyflakes with flake8.

@gfreezy gfreezy closed this
@unphased

Hi, how is flake8 canonically installed? I'm having a hard time googling for the right course of action ... I'm wondering if I need to brew install python on my mac to get pip in order to get flake8, and unsure if that will use the right version of python or not.

@gfreezy

@unphased Any methods would work. Just make sure flake8 is in your PATH.

@unphased

@gfreezy I did brew python (to get 2.7.3 which comes with pip) then got flake8 with pip, but that did not seem to install any links anywhere to flake8.

... Ah... wait, I found this: /usr/local/share/python/flake8 Looks like I just add this to my path and I'm good.

Do you know where ST3 obtains the path? Surely it will fail if I add this python bin dir to my .zshrc

Edit: Oh, right that'd be /private/etc/paths

@unphased

ST3 is not gaining the proper paths according to /private/etc/paths. I now have the right paths there but it is still not working the way I'd expect...

But now I just ran it through the subl command and it finally was able to locate flake8... Does anybody know where ST3 is gaining the paths? I can see in the console by entering import os; print (os.environ) the settings there, but it seems to change depending on the method that the program is invoked (from the Spotlight search or from the command line, for example).

@gfreezy

@unphased You may add

  "sublimelinter_executable_map":
  {
       "python": "path/to/flake8"
  },

to your personal SublimeLinter.sublime-settings.

@unphased

This is a decent workaround, thanks.

I do believe ST3 is currently failing to correctly retrieve $PATH on my machine. It gets by with its own Python3 but it in all likelihood won't be executing the right version of Git for example. Which will mostly not result in any perceptible difference. However if it uses different paths depending on which way the program is started, that may lead to strange inconsistencies down the road. At least I am aware of this now. Did make a post on the sublime forum about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 3, 2013
  1. @gfreezy

    migrate to sublime text 3

    gfreezy authored
Commits on Feb 4, 2013
  1. @gfreezy

    remove unneeded lines

    gfreezy authored
  2. @gfreezy

    update README

    gfreezy authored
Something went wrong with that request. Please try again.