Hello <@U04S45AHA>, sorry to bother, one of my co...
# pex
r
Hello @enough-analyst-54434, sorry to bother, one of my coworkers is trying to use pants in his machine, but gets a weird permission error (no bug on my end with the same repo):
Copy code
17:16:29 00:02   [pyprep]
17:16:29 00:02     [interpreter]
17:16:29 00:02     [build-local-dists]
17:16:29 00:02     [requirements]
17:16:29 00:02       [cache]
                   No cached artifacts for 20 targets.
                   Invalidated 20 targets.pex: Resolving for:
pex: Isolating pex in Chroot(/var/folders/ty/mh344wcn4z1gdf_nm_nht80h0000gn/T/tmpodrznp4n {fs:}): 187.2ms
  ERROR: Command errored out with exit status 1:
   command: /Library/Developer/CommandLineTools/usr/bin/python3 /var/folders/ty/mh344wcn4z1gdf_nm_nht80h0000gn/T/tmpodrznp4n/pex/vendor/_vendored/pip/pip install --ignore-installed --no-user --prefix /private/var/folders/ty/mh344wcn4z1gdf_nm_nht80h0000gn/T/pip-build-env-9zw3xco9/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i <https://pypi.org/simple/> -- 'numpy>=1.17.3' 'Cython>=0.29.14' setuptools wheel
       cwd: None
  Complete output (13 lines):
  Looking in indexes: <https://pypi.org/simple/>
  Collecting numpy>=1.17.3
    Using cached <https://files.pythonhosted.org/packages/2f/5b/2cc2b9285e8b2ca8d2c1e4a2cbf1b12d70a2488ea78170de1909bca725f2/numpy-1.18.1-cp37-cp37m-macosx_10_9_x86_64.whl>
  Collecting Cython>=0.29.14
    Using cached <https://files.pythonhosted.org/packages/9b/e6/6e30303d7bc17289411d82276b7338a1781964171c94f5ebe689cbecad4c/Cython-0.29.14-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl>
  Collecting setuptools
    Using cached <https://files.pythonhosted.org/packages/af/e7/02db816dc88c598281bacebbb7ccf2c9f1a6164942e88f1a0fded8643659/setuptools-45.0.0-py2.py3-none-any.whl>
  Collecting wheel
    Using cached <https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl>
  Installing collected packages: numpy, Cython, setuptools, wheel
  ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/3.7/site-packages/numpy/conftest.py'
  Consider using the `--user` option or check the permissions.
This happens when trying to install this package https://github.com/Sterblue/cocoapi, apparently it uses the python system to do a pep 517 install ?
h
Ah, this unfortunately doesn’t work yet but is very close to being fixed. Recently, John changed Pex to vendor Pip so that it has support for things like Pep 517/518. That’s in the Pex 2.x series Pants is still using Pex 1.x, but John’s #1 issue he’s been working on is upgrading Pants to 2.x
r
ah yes I know, I'm using pants
1.24.0.dev2
which uses
pex=2.0.0
with vendored pip, before the reverse commit haha
👍 1
Found the bug, it's not exactly related to pants I think, my coworker had a very messed installations of python and pants was using a version while pep 517/518 was using another for the build packages (probably I'm not sure)
👍 1
Fixed it by removing the python that is discovered by pep 517/518
👍 1
h
Awesome. John may ask you questions when he’s online to figure out if Pex needs to handle this case, but glad to hear it’s resolved!
👍 1
e
The issue you hit in Pex 2.0.0 may have been fixed by https://github.com/pantsbuild/pex/pull/828 which is part of Pex 2.1.0. That PR dogfoods pex to run pip in an isolated environment: https://github.com/pantsbuild/pex/pull/828/files#diff-77bac56887c1a03806e247fe60c2024cR25
r
ah yes cool, any ETA for when it will be available in pants?