我一直在尝试安装pylint以在终端上使用,但是一直无法成功使用它。安装成功,但每当我尝试运行pylint命令时,它都会返回以下错误-
我一直在努力安装pylint以在终端上使用,但是尝试不成功。安装成功后,每当我尝试运行pylint命令时,就会返回以下错误-
-bash: pylint: command not found
我已经尝试使用以下命令 -
pip install pylint
python -m pip install pylint
sudo pip install pylint
sudo -H pip install pylint
在尝试以上各个命令之前,我已经卸载了它,但每次重新安装时,安装都会成功,但我无法在命令行中使用它。我知道我错过了一些愚蠢的东西。
这是我在安装时得到的输出 -
My-Mac:Dev noob$ sudo -H pip install pylint
Collecting pylint
Using cached pylint-1.6.5-py2.py3-none-any.whl
Requirement already satisfied: isort>=4.2.5 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: six in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: mccabe in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: configparser; python_version == "2.7" in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: backports.functools-lru-cache; python_version == "2.7" in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: astroid<1.5.0,>=1.4.5 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from pylint)
Requirement already satisfied: wrapt in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from astroid<1.5.0,>=1.4.5->pylint)
Requirement already satisfied: lazy-object-proxy in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from astroid<1.5.0,>=1.4.5->pylint)
Installing collected packages: pylint
Successfully installed pylint-1.6.5
PS:我使用的是Macbook pro Late 2011上的macOS Sierra 10.12.3,如果这有关系,请注意。