flaky-photographer-75744
04/17/2019, 3:09 PM1.11.0rc2
to 1.14.0
, I can't compile anything and I get the following error.
16:52:27 00:02 [conan-prep]**** Failed to install setuptools-40.4.3 (caused by: NonZeroExit("received exit code 1 during execution of `['/usr/bin/python3.6', '-', 'bdist_egg', '--dist-dir=/tmp/tmpKDItdj']` while trying to execute `['/usr/bin/python3.6', '-', 'bdist_egg', '--dist-dir=/tmp/tmpKDItdj']`",)
):
stdout:
stderr:
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 5, in <module>
import distutils.core
ModuleNotFoundError: No module named 'distutils.core'
What is weird is that i can import distutils.core
from python 3.6 but what I find even weirder is that it is not using pants virtual env defined in .cache/...
.
What I tried:
- remove home/.cache/pants
- remove .cache
in working directory
- ./pants clean-all
Does that ring any bell ?hundreds-father-404
04/17/2019, 3:16 PMflaky-photographer-75744
04/17/2019, 3:19 PM1.13.0
hundreds-father-404
04/17/2019, 3:22 PM1.14.0.dev0
Iâm not quite sure what is going on and will help if we can narrow down the release it broke in.flaky-photographer-75744
04/17/2019, 3:23 PMhundreds-father-404
04/17/2019, 3:25 PMflaky-photographer-75744
04/17/2019, 3:26 PMflaky-photographer-75744
04/17/2019, 3:29 PM1.14.0.dev2
hundreds-father-404
04/17/2019, 3:31 PMconan-prep
aloof-angle-91616
04/17/2019, 3:37 PMhundreds-father-404
04/17/2019, 3:38 PMbut what I find even weirder is that it is not using pants virtual env defined in `.cache/...`.
flaky-photographer-75744
04/17/2019, 3:39 PM['/usr/bin/python3.6', '-', 'bdist_egg', '--dist-dir=/tmp/tmpKDItdj']
while we use python2.7
flaky-photographer-75744
04/17/2019, 3:40 PMpants
script we aare using is not the most up to date one.hundreds-father-404
04/17/2019, 3:42 PM./pants
script being out of date shouldnât cause any issues with 1.14.x. Although I do recommend updating it by running curl -L -O <https://pantsbuild.github.io/setup/pants>
, regardless of if youâre upgrading right away to 1.15.0. We made several improvements and it means youâll be able to upgrade to 1.15.0+ without issue.aloof-angle-91616
04/17/2019, 3:43 PMhundreds-father-404
04/17/2019, 3:43 PM--python-setup-interpreter-constraints
?hundreds-father-404
04/17/2019, 3:45 PM./pants
. I forgot that we used to pin setuptools in the original script, and we updated it to no longer do that. I donât think this is the issue, but it looks related.flaky-photographer-75744
04/17/2019, 3:51 PM./pants
alsoflaky-photographer-75744
04/17/2019, 3:52 PMhundreds-father-404
04/17/2019, 3:54 PMpants.ini
[python-setup]
interpreter_constraints: ["CPython==2.7.*"]
flaky-photographer-75744
04/17/2019, 3:55 PMflaky-photographer-75744
04/17/2019, 3:55 PMaloof-angle-91616
04/17/2019, 3:56 PMaloof-angle-91616
04/17/2019, 3:57 PMhundreds-father-404
04/17/2019, 3:58 PMflaky-photographer-75744
04/17/2019, 3:59 PMhundreds-father-404
04/17/2019, 3:59 PMflaky-photographer-75744
04/17/2019, 4:00 PMhundreds-father-404
04/17/2019, 4:04 PMinterpreter_constraints
from your pants.ini
and run ./pants test path/to:target
, then tell us which Python interpreter was being used (should print to the top of the test output)flaky-photographer-75744
04/17/2019, 4:08 PMhundreds-father-404
04/17/2019, 4:09 PMflaky-photographer-75744
04/17/2019, 4:10 PMflaky-photographer-75744
04/17/2019, 4:10 PMhundreds-father-404
04/17/2019, 6:20 PM--python-setup-interpreter-constraints
, Pants gives a default value. Until 1.14.0.dev2, we defaulted to Python 2. This meant that even with you leaving off the setting, any subprocess would always use Python 2.
But then in 1.14.0.dev2, we changed the default to either 2.7 or 3.6+. So, suddenly Pants started to use Python 3.6.
Does your coworker have Python 3.6+ installed on their computer? I suspect not, which would explain why Pants is going with Python 2.7 for them and not running into this issue.
Itâs still an open question why youâre getting the underlying issue of distutils not being foundflaky-photographer-75744
04/18/2019, 8:20 AMhundreds-father-404
04/18/2019, 8:00 PM