Select to view content in your preferred language

Pylint Cannot Run in Python Environment Created by ArcMap 10.7.1

1007
2
06-17-2020 11:00 AM
ZianChoy
Frequent Contributor

I tried to install pylint in my Python 2 environment and ran into the problem described at pylint2 crashes with "unexpected keyword argument 'inline_comment_prefixes'" · Issue #1318 · PyCQA/p... .

Has anyone been able to get pylint to run in the Python environment that ArcGIS for Desktop 10.7.1 (aka ArcMap) creates?

I tried to update the future module and got:

C:\Python27\ArcGIS10.7\Scripts>pip install future --upgrade
Collecting future
Installing collected packages: future
  Found existing installation: future 0.15.2
Cannot uninstall 'future'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
You are using pip version 18.1, however version 20.2b1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Extra Details:

- Path to Python: "C:\Python27\ArcGIS10.7\python.exe"

- Version: Python 2.7.16 (v2.7.16:413a49145e, Mar  4 2019, 01:30:55) [MSC v.1500 32 bit (Intel)] on win32

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

pylint stopped support for python 2.  Did you install a specific version?

http://pylint.pycqa.org/en/latest/whatsnew/2.0.html 


... sort of retired...
0 Kudos
ZianChoy
Frequent Contributor

Good catch. I tried installing 1.9.5 with pip and it succeeds: "Successfully installed pylint-1.9.5" but when I run pylint, I get:

C:\Python27\ArcGIS10.7\Scripts>pylint.exe
Traceback (most recent call last):
  File "c:\python27\arcgis10.7\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\arcgis10.7\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\ArcGIS10.7\Scripts\pylint.exe\__main__.py", line 9, in <module>
  File "c:\python27\arcgis10.7\lib\site-packages\pylint\__init__.py", line 15, in run_pylint
    from pylint.lint import Run
  File "c:\python27\arcgis10.7\lib\site-packages\pylint\lint.py", line 64, in <module>
    import astroid
  File "c:\python27\arcgis10.7\lib\site-packages\astroid\__init__.py", line 136, in <module>
    __import__(module[:-3])
  File "c:\python27\arcgis10.7\lib\site-packages\astroid\brain\brain_functools.py", line 7, in <module>
    from astroid import extract_node
ImportError: cannot import name extract_node

0 Kudos