如何将 pylint 安装到 vscode 上?

如何将 pylint 安装到 vscode 上?

如何将 pylint 安装到 Visual Studio Code 中?编辑抱怨

未安装 Linter pylint。

我点击安装并出现错误:

 /usr/bin/python3 -m pip install -U pylint --user
Collecting pylint
  Using cached https://files.pythonhosted.org/packages/a5/06/ecef826f319055e6b231716730d7f9047dd7524ffda224b521d989f085b6/pylint-2.2.2-py3-none-any.whl
Collecting isort>=4.2.5 (from pylint)
  Using cached https://files.pythonhosted.org/packages/1f/2c/22eee714d7199ae0464beda6ad5fedec8fee6a2f7ffd1e8f1840928fe318/isort-4.3.4-py3-none-any.whl
Collecting mccabe (from pylint)
  Using cached https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl
Collecting astroid>=2.0.0 (from pylint)
  Using cached https://files.pythonhosted.org/packages/fc/53/8809bc008bad0300897281a7b320b286dc0e84e836396c0cff6279841e8a/astroid-2.1.0-py3-none-any.whl
Collecting typed-ast; python_version < "3.7" and implementation_name == "cpython" (from astroid>=2.0.0->pylint)
  Using cached https://files.pythonhosted.org/packages/de/50/7571200eff27c5c30dafa595e355495e1de85aad5fa3fe4c206791d827ff/typed_ast-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting lazy-object-proxy (from astroid>=2.0.0->pylint)
  Using cached https://files.pythonhosted.org/packages/65/1f/2043ec33066e779905ed7e6580384425fdc7dc2ac64d6931060c75b0c5a3/lazy_object_proxy-1.3.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting wrapt (from astroid>=2.0.0->pylint)
  Using cached https://files.pythonhosted.org/packages/78/4d/c3f9bd791683bd61b7799e465872bf5f4495fe3abb6c4f119419b9f606eb/wrapt-1.11.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-2n2w9ncs/wrapt/

lsb_release -a 输出

No LSB modules are available.
Distributor ID: LinuxMint
Description:    Linux Mint 19.1 Tessa
Release:    19.1
Codename:   tessa

我也收到消息了

code -v
1.30.2
61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
x64

uname -r
4.15.0-43-generic

答案1

您可以使用以下命令安装使用 setuptools 打包的 Python 应用程序。

python setup.py install 

或者

python3 setup.py install

在 Ubuntu / Mint 或 Debian 上安装 setuptools

apt-get install python-setuptools

For python3
apt-get install python3-setuptools

红帽/CentOS

yum python-setuptools

相关内容