marcoceppi / brackets-flake8

Flake8 linting for python
Apache License 2.0
1 stars 3 forks source link

flake8 not found OS X #4

Open david-dever-23-box opened 10 years ago

david-dever-23-box commented 10 years ago

Extension cannot find valid flake8 installation on OS X, installed as

sudo pip install flake8 -- upgrade

nspforever commented 9 years ago

Here is the work around:

  1. Click "Help" menu then click the "Show Extensions Folder" then go to brackets-flake8
  2. Edit the defaultPreferences.js and change line 15 to defaultPreferences.flake8IsInSystemPath = false; and change defaultPreferences.flake8Path = "/usr/local/bin/flake8";
  3. Quit Brackets IDE
  4. Step 3 does not work try click Debug menu then click "Restart Node" menu item then restart Brackets IDE again.
david-dever-23-box commented 9 years ago

Sorry, that does not resolve the problem: • OS X 10.10 Yosemite • Brackets Release 0.44 experimental build 0.44.0-14876 (release 6d2d33d80)

marcoceppi commented 9 years ago

A rewrite of the plugin is underway to use the new linter interface which should improve it's current configuration

david-dever-23-box commented 9 years ago

Is there presently a prescribed workaround, or is this a compatibility issue with newer versions of flake8, on OS X, or in general?

marcoceppi commented 9 years ago

Can you run which pep8 on your system?

david-dever-23-box commented 9 years ago
$ sudo pip install flake8
Downloading/unpacking flake8
  Downloading flake8-2.2.5.tar.gz
  Running setup.py (path:/private/tmp/pip_build_root/flake8/setup.py) egg_info for package flake8

Downloading/unpacking pyflakes>=0.8.1 (from flake8)
  Downloading pyflakes-0.8.1-py2.py3-none-any.whl
Downloading/unpacking pep8>=1.5.7 (from flake8)
  Downloading pep8-1.5.7-py2.py3-none-any.whl
Downloading/unpacking mccabe>=0.2.1 (from flake8)
  Downloading mccabe-0.2.1.tar.gz
  Running setup.py (path:/private/tmp/pip_build_root/mccabe/setup.py) egg_info for package mccabe

Installing collected packages: flake8, pyflakes, pep8, mccabe
  Running setup.py install for flake8

    Installing flake8 script to /usr/local/bin
  Running setup.py install for mccabe

Successfully installed flake8 pyflakes pep8 mccabe
Cleaning up...
$ which pep8
/usr/local/bin/pep8
marcoceppi commented 9 years ago

Yeah, system should work. Have you tried adjusting the path to /usr/local/bin/pep8 in the defaultPreferences file?

david-dever-23-box commented 9 years ago

pep8, in the flake8 preferences file??

marcoceppi commented 9 years ago

BLEH, sorry, I mean flake8, run which flake8 (Though, pep8 will work with this plugin)

david-dever-23-box commented 9 years ago

Yes, no change

david-dever-23-box commented 9 years ago
/*global brackets, define */

define(function (require, exports, module) {
    "use strict";

    // Default preferences are different for platforms
    var defaultPreferences = {
        "panelEnabled":                     true,
        // these are set by platform
        "flake8IsInSystemPath":               null,
        "flake8Path":                         null,
        "msysflake8Path":                     null
    };

    defaultPreferences.flake8IsInSystemPath = false;
    defaultPreferences.flake8Path           = "/usr/local/bin/flake8";

    module.exports = defaultPreferences;
});
marcoceppi commented 9 years ago

I'll take a look and push a patch the rewrite to linter is going to take a bit longer

david-dever-23-box commented 9 years ago

OK

basbebe commented 9 years ago

same problem for me – the window just stays empty…

billyhunt commented 9 years ago

Any progress on this? I would love to be able to use your extension.

robphoenix commented 9 years ago

I appear to be having the same issue on Windows 7, the flake8 window just stays empty.

B:\ > > which flake8
C:\Python27\Scripts\flake8.EXE
    defaultPreferences.flake8Path           = "C:\Python27\Scripts\flake8.EXE";
michel117 commented 9 years ago

I can report that I have the same issue on osx 10.10.3

michel117 commented 9 years ago

Even hard coding the path does not help:

  function getFLAKE8Binary() {

        return "/usr/local/bin/flake8"

//        if (preferences.getValue("flake8IsInSystemPath")) {
//            return "flake8";
//        } else {
//                preferences.getValue("flake8Path");
//        }
    }
schroef commented 7 years ago

sorry for asking but i cant get flake to install, when i try; $ sudo pip install flake8 or without $ sign i get "command not found in terminal using osx 10.11.6

schroef commented 6 years ago

I got the flake installed but still shows error in the installed window. Using OSX 10.11.6 I see this error though when i tried to run the install code, the upgrade code seemed to work. That didnt return errors.

screen shot 2017-11-12 at 15 54 35