freezing-lamp-12123
08/03/2022, 7:33 PM❯ ./pants roots
pants-plugins
where do i point my editor to to get the proper path for the current version of the pants python libraries? as i understand it pants bundles it’s own python somewhere
digging around in ~/.cache/pants
i’ve found ~/.cache/pants/setup/bootstrap-Darwin-arm64/pants.bA7ZRm/install/lib/python3.9/site-packages/
…. which looks promising, but is there some established way through a similar command to get to this path without manual spelunking? and is this enough to get lsp support?
let me iterate — i’m in no way a python developer 😆hundreds-father-404
08/03/2022, 7:35 PMexport
goal: https://www.pantsbuild.org/docs/setting-up-an-ide#python-third-party-dependencies-and-toolsfreezing-lamp-12123
08/03/2022, 7:43 PMhundreds-father-404
08/03/2022, 7:44 PMhundreds-father-404
08/03/2022, 7:45 PMpants_requirements
target generator makes sure Pants-as-a-library is the same version used as Pants-as-a-binaryfreezing-lamp-12123
08/03/2022, 7:45 PMfreezing-lamp-12123
08/04/2022, 6:08 AM❯ ./pants export
08:06:30.66 [INFO] Completed: Building pytest.pex from pytest_default.lock
08:06:30.66 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building pytest.pex from pytest_default.lock' failed with exit code 1.
stdout:
stderr:
ERROR: Command errored out with exit status 1:
command: /Users/dreuss/.cache/pants/named_caches/pex_root/venvs/s/51b60de7/venv/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/dreuss/.cache/pants/named_caches/pex_root/tmp/pip-req-build-if47ksg3/setup.py'"'"'; __file__='"'"'/Users/dreuss/.cache/pants/named_caches/pex_root/tmp/pip-req-build-if47ksg3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' --no-user-cfg egg_info --egg-base /Users/dreuss/.cache/pants/named_caches/pex_root/tmp/pip-pip-egg-info-_hh2wnqu
cwd: /Users/dreuss/.cache/pants/named_caches/pex_root/tmp/pip-req-build-if47ksg3/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/dreuss/.cache/pants/named_caches/pex_root/venvs/s/51b60de7/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 37, in <module>
from setuptools.dist import Distribution, Feature # vendor:skip
File "/Users/dreuss/.cache/pants/named_caches/pex_root/venvs/s/51b60de7/venv/lib/python3.7/site-packages/setuptools/dist.py", line 57, in <module>
from setuptools import windows_support # vendor:skip
File "/Users/dreuss/.cache/pants/named_caches/pex_root/venvs/s/51b60de7/venv/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/Users/dreuss/.pyenv/versions/3.7.13/lib/python3.7/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
this is sort of exactly the types of problems i was hoping not to battle with a tool like pants 😆wide-midnight-78598
08/04/2022, 12:04 PMfreezing-lamp-12123
08/04/2022, 12:04 PMfreezing-lamp-12123
08/04/2022, 12:06 PMwide-midnight-78598
08/04/2022, 12:08 PMwide-midnight-78598
08/04/2022, 12:13 PMhundreds-father-404
08/04/2022, 3:54 PMfreezing-lamp-12123
08/04/2022, 3:58 PMfreezing-lamp-12123
08/04/2022, 6:28 PM❯ ./pants export
20:27:30.09 [INFO] Initializing scheduler...
20:27:30.20 [INFO] Scheduler initialized.
20:27:33.59 [INFO] Completed: Building pytest.pex from pytest_default.lock
Wrote virtualenv for the tool 'pytest' to dist/export/python/virtualenvs/tools
thanks! .. using 3.9 did the trick ❤️