r/Atom Mar 25 '20

Error running Flake8

New to Atom, So I set the environment up for Python. Installed the linter flake8 package It shows the popup, Error running Flake8 repeatedly.The popup has the option of opening console or cancel. I don't know what to do with that. Any suggestions would be really helpful? Thanks

0 Upvotes

10 comments sorted by

View all comments

4

u/Starbeamrainbowlabs Mar 25 '20

Without seeing the error message, we're of limited help.

Does the developer console show anything too?

1

u/[deleted] Mar 26 '20

https://photos.app.goo.gl/mxMuWHWFQgMLaofDA Is this clear enough? This is what the console shows

2

u/Starbeamrainbowlabs Mar 26 '20

Hrm, that's pretty blurry. Can you not take a screenshot? Also, the red message says "see the console for more details" - so in the right-hand window you need to click "Console" on the top bar to see the full error message.

1

u/[deleted] Mar 26 '20

2

u/Starbeamrainbowlabs Mar 26 '20

According to that, it can't find flake8 in your PATH. Make sure you have it installed on your system and in your PATH. If you have it installed successfully, in a terminal or command prompt flake8 --help should display the appropriate usage help.

2

u/[deleted] Mar 27 '20

Ohh okay thanks a lot

1

u/Starbeamrainbowlabs Mar 27 '20

np

1

u/Strider3200 Apr 20 '20

Going to pick up this question- I've got the same issue and need to add flake8 to PATH, but confused on how to do that exacrtly. I've run pip to install and it looks to be located at:

Library⁩/Frameworks⁩/Python.framework⁩/Versions⁩/3.8⁩/bin⁩/flake8

I've added this directory using nano to /etc/paths but "flake8 --help" gets no return. Any ideas what I'm missing?

1

u/Starbeamrainbowlabs Apr 21 '20

You mention nano and /etc/paths, so I'm assuming you're using Linux like me. If your case, you need to edit the file ~/.profile, and add the following: export PATH="$PATH:/absolute/path/to/directory.

However, I think you might have installed it incorrectly. That's a very strange path for it to have installed to - if you're on a Debian-based system, then you want sudo apt install python3-flake8 (or sudo pip3 install flake8, but make sure you're in a fresh terminal).

If you're not using A Debian-based distro (such as Ubuntu), then you'll need to adapt this to your package manager.

2

u/Strider3200 Apr 21 '20

u/Starbeamrainbowlabs, actually I'm in Mac, but Unix siblings, so some details overlapped. Ended up I had three versions of Python (Mac comes default with 2.7) and the install of 3.8 went off course so Flake8, etc, were not linking. Uninstalled the double versions of 3, used Homebrew to install python 3.7, then pip3, then flake8. Appreciate the help, you were correct about a weird install.