[英]Sublime Linter Path issue can't find flake 8 (probably due to using Pyenv
I installed Sublime Linter and the Sublime Linter Plugin Using Package Control and installed Flake8 using pip.我使用 Package Control 安装了 Sublime Linter 和 Sublime Linter 插件,并使用 pip 安装了 Flake8。
I am using pyenv to manage my Python installs.我正在使用 pyenv 来管理我的 Python 安装。
When installing flake 8 I get this message:安装 flake 8 时,我收到以下消息:
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?如何将 SublimeLinter 指向 flake8 的 pyenv 安装?
You also need to install the sublimeLinter-flake8
plugin, and follow the installation instructions.您还需要安装sublimeLinter-flake8
插件,并按照安装说明进行操作。 The settings (available at Sublime Text → Preferences → Package Settings → SublimeLinter
on Mac) are pretty self-explanatory.这些设置(可在Sublime Text → Preferences → Package Settings → SublimeLinter
on Mac 中获得)非常不言自明。 Customize your user settings to include flake8 and any options you want to send to it.自定义您的用户设置以包括 flake8 和您要发送给它的任何选项。 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.将paths:osx
键设置为"/Users/<user>/.pyenv/shims"
,将linters:flake8:python
设置为 virtualenv 中python
或python3
二进制文件的完整路径。 Make sure you read through all the settings carefully so you know exactly what you want to customize.确保您仔细阅读所有设置,以便准确了解要自定义的内容。 Documentation is also available here .文档也可在此处获得。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.