First of all, thank you for such a vibrant helpful community. It is helpful! I am on OSX 10.13. I have Python 3 and 2 installed on the mac and used the command (python3 -m pip install flake8) to download flake8. All seemed to go smoothly, but when I then type:
$ flake8 --version
It says "Command not found". I want to use flake8 in sublime text 3 but right now, it doesn't seem to be pointing to the correct location. If I type:
$ pip3 show -f flake8
It finds the location (code below). Any help would be appreciated.
Name: flake8
Version: 3.7.7
Summary: the modular source code checker: pep8, pyflakes and co
Home-page: https://gitlab.com/pycqa/flake8
Author: Tarek Ziade
Author-email: tarek@ziade.org
License: MIT
Location: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
Requires: entrypoints, pycodestyle, pyflakes, mccabe
Required-by:
Files:
../../../bin/flake8
flake8-3.7.7.dist-info/INSTALLER
flake8-3.7.7.dist-info/LICENSE
flake8-3.7.7.dist-info/METADATA
flake8-3.7.7.dist-info/RECORD
flake8-3.7.7.dist-info/WHEEL
flake8-3.7.7.dist-info/entry_points.txt
flake8-3.7.7.dist-info/top_level.txt
flake8/__init__.py
flake8/__main__.py
flake8/__pycache__/__init__.cpython-37.pyc
flake8/__pycache__/__main__.cpython-37.pyc
flake8/__pycache__/checker.cpython-37.pyc
flake8/__pycache__/defaults.cpython-37.pyc
flake8/__pycache__/exceptions.cpython-37.pyc
flake8/__pycache__/processor.cpython-37.pyc
flake8/__pycache__/statistics.cpython-37.pyc
flake8/__pycache__/style_guide.cpython-37.pyc
flake8/__pycache__/utils.cpython-37.pyc
flake8/api/__init__.py
flake8/api/__pycache__/__init__.cpython-37.pyc
flake8/api/__pycache__/legacy.cpython-37.pyc
flake8/api/legacy.py
flake8/checker.py
flake8/defaults.py
flake8/exceptions.py
flake8/formatting/__init__.py
flake8/formatting/__pycache__/__init__.cpython-37.pyc
flake8/formatting/__pycache__/base.cpython-37.pyc
flake8/formatting/__pycache__/default.cpython-37.pyc
flake8/formatting/base.py
flake8/formatting/default.py
flake8/main/__init__.py
flake8/main/__pycache__/__init__.cpython-37.pyc
flake8/main/__pycache__/application.cpython-37.pyc
flake8/main/__pycache__/cli.cpython-37.pyc
flake8/main/__pycache__/debug.cpython-37.pyc
flake8/main/__pycache__/git.cpython-37.pyc
flake8/main/__pycache__/mercurial.cpython-37.pyc
flake8/main/__pycache__/options.cpython-37.pyc
flake8/main/__pycache__/setuptools_command.cpython-37.pyc
flake8/main/__pycache__/vcs.cpython-37.pyc
flake8/main/application.py
flake8/main/cli.py
flake8/main/debug.py
flake8/main/git.py
flake8/main/mercurial.py
flake8/main/options.py
flake8/main/setuptools_command.py
flake8/main/vcs.py
flake8/options/__init__.py
flake8/options/__pycache__/__init__.cpython-37.pyc
flake8/options/__pycache__/aggregator.cpython-37.pyc
flake8/options/__pycache__/config.cpython-37.pyc
flake8/options/__pycache__/manager.cpython-37.pyc
flake8/options/aggregator.py
flake8/options/config.py
flake8/options/manager.py
flake8/plugins/__init__.py
flake8/plugins/__pycache__/__init__.cpython-37.pyc
flake8/plugins/__pycache__/manager.cpython-37.pyc
flake8/plugins/__pycache__/pyflakes.cpython-37.pyc
flake8/plugins/manager.py
flake8/plugins/pyflakes.py
flake8/processor.py
flake8/statistics.py
flake8/style_guide.py
flake8/utils.py
I believe the output of the code is asking me for some more dependencies but not sure what. Thank you.
It means that flake8 might not be in $PATH environment variable. Try which flake8
to be sure. If it's not present, make sure to add it.
For e.g in my work environment
$ which flake8
/Library/Frameworks/Python.framework/Versions/3.6/bin/flake8
and in my .bash_profile which I use to declare PATH environment variable
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:...."
export $PATH