how does pants choose the python version it uses? ...
# general
p
how does pants choose the python version it uses? pants seems to be using my mac built in python version which has an old openssl build
e
It uses a python-setup subsystem:
Copy code
$ ./pants options --scope=python-setup | grep interpreter
python-setup.interpreter_cache_dir = None (from NONE)
python-setup.interpreter_constraints = ['CPython>=2.7,<3'] (from HARDCODED)
python-setup.interpreter_search_paths = [] (from HARDCODED)
You can set options in pants.ini to control the version range for the interpreter and you can also use a limited set of search paths to exclude Apple-shipped interpreters.
The one non-obvious detail after that is Pants picks lowest-compatible for any version range.
p
hmmm... does this control what pyprep uses?
my problem is in pyprep using an old version i think, this:
Copy code
10:31:48 00:02   [pyprep]
10:31:48 00:02     [interpreter]
10:31:48 00:02     [build-local-dists]
10:31:48 00:02     [requirements]
10:31:48 00:02       [cache]                                 
                   No cached artifacts for 33 targets.
                   Invalidated 33 targets.**** Failed to install pyspark-2.3.1 (caused by: NonZeroExit("received exit code 1 during execution of `[u'/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7', '-', 'bdist_wheel', '--dist-dir=/var/folders/_q/zhx_jm011cv404s1nyy5n41w0000gn/T/tmpu7I0s0']` while trying to execute `[u'/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7', '-', 'bdist_wheel', '--dist-dir=/var/folders/_q/zhx_jm011cv404s1nyy5n41w0000gn/T/tmpu7I0s0']`",)
):
stdout:

stderr:
Could not import pypandoc - required to package PySpark
Download error on <https://pypi.python.org/simple/pypandoc/>: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
OH i had to wipe .cache and ,pants.d
thanks!
h
Hmm, not good that you had to do that.
Seems like a bug.
e
Pretty sure since fixed - or at least there was a PR