proud-dentist-22844
04/12/2021, 8:06 PM./pants lint :: --print-stacktrace -ldebug
https://gist.github.com/cognifloyd/a8cfc16c5d968865a09b34a9250c6fdd#file-1-pants-lint-debug
./pants lint :: --no-process-execution-cleanup-local-dirs
https://gist.github.com/cognifloyd/a8cfc16c5d968865a09b34a9250c6fdd#file-2-pants-no-process-execution-cleanup-local-dirs
contents of __run.sh
after I added -vvv
to the pip command
https://gist.github.com/cognifloyd/a8cfc16c5d968865a09b34a9250c6fdd#file-3-__run-sh
output of running that modified __run.sh
https://gist.github.com/cognifloyd/a8cfc16c5d968865a09b34a9250c6fdd#file-4-run-__run-sh
I think this is the real error:
pkg_resources.VersionConflict: (setuptools 44.0.0 (/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/setuptools), Requirement.parse('setuptools>=45'))
https://gist.github.com/cognifloyd/a8cfc16c5d968865a09b34a9250c6fdd#file-4-run-__run-sh-L2857
Depending on the version of pants, the version of pylint, and a few settings, Pip complains it can’t find wrapt, or a few other deps, but that setuptools VersionConflict error always seems to be there.
I’m not sure where to go from here.happy-kitchen-89482
04/12/2021, 10:01 PMhappy-kitchen-89482
04/12/2021, 11:21 PMhappy-kitchen-89482
04/12/2021, 11:22 PMproud-dentist-22844
04/13/2021, 12:06 AMenough-analyst-54434
04/13/2021, 1:02 AM/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/distutils-precedence.pth
?enough-analyst-54434
04/13/2021, 1:28 AM.pth
is installed by setuptools (meaning you must have setuptools installed in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
) and it sneaks in an importer that finds a version of distutils vendored by setuptools. If I read that correctly, it means setuptools sneaks itself onto the sys.path of your Python installation via that importer. So when Pex scrubs away /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
it does not manage to scrub away setuptools.
That's my current guess anyhow. I'll try to set up the same scenario on my machine and see if I can get a repro...happy-kitchen-89482
04/13/2021, 1:30 AMhappy-kitchen-89482
04/13/2021, 1:30 AMenough-analyst-54434
04/13/2021, 1:44 AM$ PEX_VERBOSE=3 SETUPTOOLS_USE_DISTUTILS=local python3.6 pex -vvv "wrapt==1.12.1"
pex: Extracting pex to /home/jsirois/.pex/unzipped_pexes/fe5a6e33c47ab8f54825dc7dd841561189270730: 154.3ms
pex: Executing unzipped pex for pex at /home/jsirois/.pex/unzipped_pexes/fe5a6e33c47ab8f54825dc7dd841561189270730
pex: Installed VendorImporter(root='/home/jsirois/.pex/unzipped_pexes/fe5a6e33c47ab8f54825dc7dd841561189270730/.bootstrap', importables=(_Importable(module='attr', is_pkg=True, path='pex/vendor/_vendored/attrs', prefix='pex.third_party'), _Importable(module='pyparsing', is_pkg=False, path='pex/vendor/_vendored/packaging', prefix='pex.third_party'), _Importable(module='packaging', is_pkg=True, path='pex/vendor/_vendored/packaging', prefix='pex.third_party'), _Importable(module='setuptools', is_pkg=True, path='pex/vendor/_vendored/setuptools', prefix='pex.third_party'), _Importable(module='pkg_resources', is_pkg=True, path='pex/vendor/_vendored/setuptools', prefix='pex.third_party'), _Importable(module='wheel', is_pkg=True, path='pex/vendor/_vendored/wheel', prefix='pex.third_party')))
pex: Using $PATH constrained by ['>=2.7,<3.10,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*']
pex: Constraints on interpreters: ['>=2.7,<3.10,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*'], Matching Interpreter: /home/jsirois/.pyenv/versions/3.6.8/bin/python3.6
pex: Selecting runtime interpreter: 2.1ms
pex: Using the current interpreter /home/jsirois/.pyenv/versions/3.6.8/bin/python3.6 since it matches constraints and PYTHONPATH is not set.
pex: Found site-library: /home/jsirois/.pyenv/versions/3.6.8/lib/python3.6/site-packages
pex: Found .pth file: /home/jsirois/.pyenv/versions/3.6.8/lib/python3.6/site-packages/distutils-precedence.pth
pex: Not a tainted path element: /home/jsirois/.pex/unzipped_pexes/fe5a6e33c47ab8f54825dc7dd841561189270730/.bootstrap
pex: Not a tainted path element: /home/jsirois/.pex/unzipped_pexes/fe5a6e33c47ab8f54825dc7dd841561189270730
pex: Not a tainted path element: /home/jsirois/.pyenv/versions/3.6.8/lib/python36.zip
pex: Not a tainted path element: /home/jsirois/.pyenv/versions/3.6.8/lib/python3.6
pex: Not a tainted path element: /home/jsirois/.pyenv/versions/3.6.8/lib/python3.6/lib-dynload
pex: Tainted path element: /home/jsirois/.pyenv/versions/3.6.8/lib/python3.6/site-packages
pex: Scrubbing from user site: /home/jsirois/.local/lib/python3.6/site-packages
pex: Scrubbing from site-packages: /home/jsirois/.pyenv/versions/3.6.8/lib/python3.6/site-packages
pex: Dropping _distutils_hack
pex: Dropping setuptools
...
proud-dentist-22844
04/13/2021, 2:27 AMimport os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get(var, 'stdlib') == 'local'; enabled and __import__('_distutils_hack').add_shim();
proud-dentist-22844
04/13/2021, 2:30 AMenough-analyst-54434
04/13/2021, 2:31 AMenough-analyst-54434
04/13/2021, 2:31 AMhappy-kitchen-89482
04/13/2021, 2:33 AMproud-dentist-22844
04/13/2021, 2:34 AMPEX_VERBOSE=3 SETUPTOOLS_USE_DISTUTILS=local python3.6 pex -vvv "wrapt==1.12.1"
end in this error for you?
ModuleNotFoundError: No module named 'setuptools'
proud-dentist-22844
04/13/2021, 2:35 AM./pex
) and it died with that error.enough-analyst-54434
04/13/2021, 2:37 AMenough-analyst-54434
04/13/2021, 2:44 AMproud-dentist-22844
04/13/2021, 2:51 AMproud-dentist-22844
04/13/2021, 2:52 AMproud-dentist-22844
04/13/2021, 2:52 AMenough-analyst-54434
04/13/2021, 2:52 AMenough-analyst-54434
04/13/2021, 2:52 AMenough-analyst-54434
04/13/2021, 2:53 AMhappy-kitchen-89482
04/13/2021, 2:53 AMhappy-kitchen-89482
04/13/2021, 2:53 AMproud-dentist-22844
04/13/2021, 3:01 AMproud-dentist-22844
04/13/2021, 3:02 AM