pylint-dev / pylint

It's not just a linter that annoys you!
https://pylint.readthedocs.io/en/latest/
GNU General Public License v2.0
5.31k stars 1.14k forks source link

addition of editdistance dependency requires g++ #1423

Closed mmacvicar23 closed 7 years ago

mmacvicar23 commented 7 years ago

addition of editdistance dependency requires g++

Steps to reproduce

  1. pip install pylint on system without g++

Current behavior

the following error is reported:

Collecting pylint
  Using cached pylint-1.7.0-py2.py3-none-any.whl
Collecting astroid>=1.5.1 (from pylint)
  Using cached astroid-1.5.1-py2.py3-none-any.whl
Collecting isort>=4.2.5 (from pylint)
  Using cached isort-4.2.5-py2.py3-none-any.whl
Collecting singledispatch; python_version < "3.4" (from pylint)
  Using cached singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting configparser; python_version == "2.7" (from pylint)
Collecting mccabe (from pylint)
  Using cached mccabe-0.6.1-py2.py3-none-any.whl
Collecting backports.functools-lru-cache; python_version == "2.7" (from pylint)
  Using cached backports.functools_lru_cache-1.3-py2.py3-none-any.whl
Collecting editdistance (from pylint)
  Using cached editdistance-0.3.1.tar.gz
Requirement already satisfied: six in ./pylint_install_env/lib/python2.7/site-packages (from pylint)
Collecting wrapt (from astroid>=1.5.1->pylint)
Collecting enum34; python_version < "3.4" (from astroid>=1.5.1->pylint)
  Using cached enum34-1.1.6-py2-none-any.whl
Collecting lazy-object-proxy (from astroid>=1.5.1->pylint)
Building wheels for collected packages: editdistance
  Running setup.py bdist_wheel for editdistance ... error
  Complete output from command /tmp/pylint_install/pylint_install_env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rMAd4H/editdistance/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpLjlHYFpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/editdistance
  copying editdistance/__init__.py -> build/lib.linux-x86_64-2.7/editdistance
  copying editdistance/_editdistance.h -> build/lib.linux-x86_64-2.7/editdistance
  copying editdistance/def.h -> build/lib.linux-x86_64-2.7/editdistance
  running build_ext
  building 'editdistance.bycython' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/editdistance
  gcc -fno-strict-aliasing -Os -fomit-frame-pointer -DNDEBUG -Os -fomit-frame-pointer -fPIC -I./editdistance -I/usr/include/python2.7 -c editdistance/_editdistance.cpp -o build/temp.linux-x86_64-2.7/editdistance/_editdistance.o
  gcc: error trying to exec 'cc1plus': execvp: No such file or directory
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for editdistance
  Running setup.py clean for editdistance
Failed to build editdistance
Installing collected packages: wrapt, singledispatch, enum34, lazy-object-proxy, backports.functools-lru-cache, astroid, isort, configparser, mccabe, editdistance, pylint
  Running setup.py install for editdistance ... error
    Complete output from command /tmp/pylint_install/pylint_install_env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rMAd4H/editdistance/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-HVKb4U-record/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/pylint_install/pylint_install_env/include/site/python2.7/editdistance:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/editdistance
    copying editdistance/__init__.py -> build/lib.linux-x86_64-2.7/editdistance
    copying editdistance/_editdistance.h -> build/lib.linux-x86_64-2.7/editdistance
    copying editdistance/def.h -> build/lib.linux-x86_64-2.7/editdistance
    running build_ext
    building 'editdistance.bycython' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/editdistance
    gcc -fno-strict-aliasing -Os -fomit-frame-pointer -DNDEBUG -Os -fomit-frame-pointer -fPIC -I./editdistance -I/usr/include/python2.7 -c editdistance/_editdistance.cpp -o build/temp.linux-x86_64-2.7/editdistance/_editdistance.o
    gcc: error trying to exec 'cc1plus': execvp: No such file or directory
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/tmp/pylint_install/pylint_install_env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rMAd4H/editdistance/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-HVKb4U-record/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/pylint_install/pylint_install_env/include/site/python2.7/editdistance" failed with error code 1 in /tmp/pip-build-rMAd4H/editdistance/

Expected behavior

Add g++ to list of requirements for install. Pylint v1.6.4 didn't have this requirement.

pylint --version output

1.7.0

vinayaka16041999 commented 4 years ago

I'm getting this error when i try to install editdistance

Building wheel for editdistance (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\vinay\AppData\Local\Temp\pip-req-build-n8ywksaj\setup.py'"'"'; file='"'"'C:\Users\vinay\AppData\Local\Temp\pip-req-build-n8ywksaj\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\vinay\AppData\Local\Temp\pip-wheel-ezsifgz5' cwd: C:\Users\vinay\AppData\Local\Temp\pip-req-build-n8ywksaj\ Complete output (12 lines): running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.8 creating build\lib.win-amd64-3.8\editdistance copying editdistance__init__.py -> build\lib.win-amd64-3.8\editdistance copying editdistance_editdistance.h -> build\lib.win-amd64-3.8\editdistance copying editdistance\def.h -> build\lib.win-amd64-3.8\editdistance running build_ext building 'editdistance.bycython' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

ERROR: Failed building wheel for editdistance Running setup.py clean for editdistance Failed to build editdistance Installing collected packages: editdistance Running setup.py install for editdistance ... error ERROR: Command errored out with exit status 1: command: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\vinay\AppData\Local\Temp\pip-req-build-n8ywksaj\setup.py'"'"'; file='"'"'C:\Users\vinay\AppData\Local\Temp\pip-req-build-n8ywksaj\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\vinay\AppData\Local\Temp\pip-record-zvnad40l\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python38\Include\editdistance' cwd: C:\Users\vinay\AppData\Local\Temp\pip-req-build-n8ywksaj\ Complete output (12 lines): running install running build running build_py creating build creating build\lib.win-amd64-3.8 creating build\lib.win-amd64-3.8\editdistance copying editdistance__init__.py -> build\lib.win-amd64-3.8\editdistance copying editdistance_editdistance.h -> build\lib.win-amd64-3.8\editdistance copying editdistance\def.h -> build\lib.win-amd64-3.8\editdistance running build_ext building 'editdistance.bycython' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

ERROR: Command errored out with exit status 1: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\vinay\AppData\Local\Temp\pip-req-build-n8ywksaj\setup.py'"'"'; file='"'"'C:\Users\vinay\AppData\Local\Temp\pip-req-build-n8ywksaj\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\vinay\AppData\Local\Temp\pip-record-zvnad40l\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python38\Include\editdistance' Check the logs for full command output.

hippo91 commented 4 years ago

@VinayakaShastri apparently this problem is not linked with pylint but with editdistance and/or vscode.