lively-zebra-24587
02/15/2023, 2:53 AMrequirements.pex
from lock files, and certain packages cannot be installed. Here's and example of the error logs:
21:45:36.76 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building 22 requirements for requirements.pex from the build-support/databricks_lock.txt resolve: boto3==1.16.7, cleanco<2.2, enigma-data-catalog-sdk, enigma-enrichment, enigma-namedframes~=1.0.2, enigma-pyspark-commons, fuzzywuzzy, jellyfish, matplotlib==3.4.2, mlflow==1.20.2, numpy<1.24,>=1.20, pandas==1.2.4, plotly==5.1.0, probablepeople, protobuf==3.17.2, pyarrow==4.0.0, pyspark-test, pyspark==3.1.2, pytest, scikit-learn==0.24.1, scipy~=1.6.0, tldextract' failed with exit code 1.
stdout:
stderr:
There were 4 errors downloading required artifacts:
1. pandas 1.2.4 from <https://files.pythonhosted.org/packages/e8/81/f7be049fe887865200a0450b137f2c574647b9154503865502cfd720ab5d/pandas-1.2.4.tar.gz>
ERROR: Command errored out with exit status 1: /Users/tom/.cache/pants/named_caches/pex_root/venvs/cac1718c056bb509f51fcdcc0c376b33deaaa8ec/80d537a6fbdf98a843c78d59de5b2b2db73ee10d/bin/python /Users/tom/.cache/pants/named_caches/pex_root/venvs/cac1718c056bb509f51fcdcc0c376b33deaaa8ec/80d537a6fbdf98a843c78d59de5b2b2db73ee10d/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /Users/tom/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-build-env-nq8fgxoc/overlay --no-warn-script-location -v --no-binary :none: --only-binary :none: -i <https://pypi.org/simple/> --extra-index-url https://****@repo.artifactory.enigma.com/artifactory/api/pypi/pypi-local/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy; python_version>='"'"'3.9'"'"'' Check the logs for full command output.
the packages that fail are pandas==1.2.4
, pyarrow==4.0.0
and scikit-learn=0.24.1
lively-zebra-24587
02/15/2023, 2:56 AMpyenv
virtualenv
• uninstalling/reinstalling pyenv
• regenerating lock files with ./pants generate-lockfiles
enough-analyst-54434
02/15/2023, 2:56 AMenough-analyst-54434
02/15/2023, 2:56 AMenough-analyst-54434
02/15/2023, 2:57 AMenough-analyst-54434
02/15/2023, 2:57 AMenough-analyst-54434
02/15/2023, 2:58 AMlively-zebra-24587
02/15/2023, 3:00 AMlively-zebra-24587
02/15/2023, 3:01 AMpip install pandas==1.2.4
enough-analyst-54434
02/15/2023, 3:01 AMenough-analyst-54434
02/15/2023, 3:03 AMenough-analyst-54434
02/15/2023, 3:03 AMlively-zebra-24587
02/15/2023, 3:07 AMlively-zebra-24587
02/15/2023, 3:08 AMlively-zebra-24587
02/15/2023, 3:09 AMlively-zebra-24587
02/15/2023, 3:18 AMpandas==1.2.4
in a fresh 3.9 virtualenv, but it fails in 3.8 with the same errors as in pantsenough-analyst-54434
02/15/2023, 3:20 AMenough-analyst-54434
02/15/2023, 3:20 AMenough-analyst-54434
02/15/2023, 3:21 AMenough-analyst-54434
02/15/2023, 3:22 AMenough-analyst-54434
02/15/2023, 3:22 AMenough-analyst-54434
02/15/2023, 3:24 AMrich-london-74860
02/15/2023, 3:27 AMDoes your repo need to work with 3.8?Unfortunately, yes. We have a lot of code that runs on Spark managed by Databricks and they set the runtime environment. We’ve standardized on using their 9.1 LTS runtime environment, which uses python 3.8
rich-london-74860
02/15/2023, 3:31 AMlibpostal
, then that would have been the necessary solution anyways. That’s what runs in CI.
@square-city-8441 also uses M1 and I think he actually may have encountered the same problem. He mostly runs the pants repo in the docker image.enough-analyst-54434
02/15/2023, 3:31 AMenough-analyst-54434
02/15/2023, 3:32 AMenough-analyst-54434
02/15/2023, 3:33 AM~/.pants.rc
is pants.toml
format, but just for you, not checked in, and it can over-ride values. Since Python 3.8 is basically broken on all M1s, this is a safe global setting. Never use 3.8 for any Pants built project.enough-analyst-54434
02/15/2023, 3:33 AMenough-analyst-54434
02/15/2023, 3:34 AMlively-zebra-24587
02/15/2023, 3:50 AM.pants.rc
fix but that didn't work either - still getting the same errors even though it's now using 3.9 pip
(it was using 3.8 before)
ERROR: Command errored out with exit status 1: /Users/tom/.cache/pants/named_caches/pex_root/venvs/cac1718c056bb509f51fcdcc0c376b33deaaa8ec/bb37135616d3b3888558cb7ec70550dd4fca7685/bin/python /Users/tom/.cache/pants/named_caches/pex_root/venvs/cac1718c056bb509f51fcdcc0c376b33deaaa8ec/bb37135616d3b3888558cb7ec70550dd4fca7685/lib/python3.9/site-packages/pip install
enough-analyst-54434
02/15/2023, 4:17 AM--keep-sandboxes=on_failure
to your command line. Then , just before the backtrace you'll see a log line about preserving a /tmp/pants-sandbox*
dir. You can then cd there and edit __run.sh
to include --preserve-pip-download-log
. Now run ./__run.sh
and look for another "preserving ..." line at the top of the output. That will be the full pip log file and you can get details on the error.enough-analyst-54434
02/15/2023, 4:19 AM__run.sh
from real Pants sandboxing - it lets your env vars leak in. So if __run.sh
succeeds, that cements an env var issue and further edits to __run.sh
to use env -i A=B C=D ... command line
will be needed to simulate that.lively-zebra-24587
02/15/2023, 4:39 AM