Reputation: 21
I installed Sublime Linter and the Sublime Linter Plugin Using Package Control and installed Flake8 using pip.
I am using pyenv to manage my Python installs.
When installing flake 8 I get this message:
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Users/<user>/.pyenv/versions/3.9.4/include/python3.9/UNKNOWN
sysconfig: /Users/<user>/.pyenv/versions/3.9.4/include/python3.9
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Requirement already satisfied: flake8 in ./.pyenv/versions/3.9.4/lib/python3.9/site-packages (3.9.1)
Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in ./.pyenv/versions/3.9.4/lib/python3.9/site-packages (from flake8) (0.6.1)
Collecting pyflakes<2.4.0,>=2.3.0
Using cached pyflakes-2.3.1-py2.py3-none-any.whl (68 kB)
Requirement already satisfied: pycodestyle<2.8.0,>=2.7.0 in ./.pyenv/versions/3.9.4/lib/python3.9/site-packages (from flake8) (2.7.0)
Installing collected packages: pyflakes
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Users/<user>/.pyenv/versions/3.9.4/include/python3.9/UNKNOWN
sysconfig: /Users/<user>/.pyenv/versions/3.9.4/include/python3.9
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Successfully installed pyflakes-2.3.1
And the path is here:
➜ ~ which flake8
/Users/<user>/.pyenv/shims/flake8
How do I point SublimeLinter to the pyenv install of flake8?
Upvotes: 2
Views: 967
Reputation: 102842
You also need to install the sublimeLinter-flake8
plugin, and follow the installation instructions. The settings (available at Sublime Text → Preferences → Package Settings → SublimeLinter
on Mac) are pretty self-explanatory. Customize your user settings to include flake8 and any options you want to send to it. Set the paths:osx
key to "/Users/<user>/.pyenv/shims"
, and the linters:flake8:python
setting to the full path to your python
or python3
binary in your virtualenv. Make sure you read through all the settings carefully so you know exactly what you want to customize. Documentation is also available here.
Upvotes: 1