Closed mikita-sakalouski closed 3 weeks ago
Thank you for using the new report command, you're the first!
I can't reproduce that particular error but I can experience the grep failing because there is no pip in the virtual environment only the parent environment and so the one in the parent has no pyspark. Try changing that script to:
log_versions = "python --version && $HATCH_UV pip freeze | grep pyspark"
That environment variable is called out here: https://hatch.pypa.io/latest/how-to/environment/select-installer/#enabling-uv
@ofek Oh, man ! That helps, after switching command to:
python --version && {env:HATCH_UV} pip freeze | grep pyspark
and
[tool.hatch.envs.default]
installer = "uv"
getting:
──────────────────────────────────────────────── test.py3.8-pyspark33 ─────────────────────────────────────────────────
Python 3.8.19
pyspark==3.3.4
──────────────────────────────────────────────── test.py3.8-pyspark34 ─────────────────────────────────────────────────
Python 3.8.19
pyspark==3.4.3
──────────────────────────────────────────────── test.py3.9-pyspark33 ─────────────────────────────────────────────────
Python 3.9.19
pyspark==3.3.4
──────────────────────────────────────────────── test.py3.9-pyspark34 ─────────────────────────────────────────────────
Python 3.9.19
pyspark==3.4.3
──────────────────────────────────────────────── test.py3.10-pyspark33 ────────────────────────────────────────────────
Python 3.10.14
pyspark==3.3.4
──────────────────────────────────────────────── test.py3.10-pyspark34 ────────────────────────────────────────────────
Python 3.10.14
pyspark==3.4.3
──────────────────────────────────────────────── test.py3.10-pyspark35 ────────────────────────────────────────────────
Python 3.10.14
pyspark==3.5.1
──────────────────────────────────────────────── test.py3.11-pyspark35 ────────────────────────────────────────────────
Python 3.11.9
pyspark==3.5.1
──────────────────────────────────────────────── test.py3.12-pyspark35 ────────────────────────────────────────────────
Python 3.12.3
pyspark==3.5.1
Now I have to make it work without specifying hardcoded versions of python in each env... but it is totally different story
Current behavior
I'm trying to have 3 test environments using the following config:
When running command
After changing
to
And removing virtual environments, together with metadata of hatch, I'm getting:
Expected behavior
Have correct version of spark when using UV.
Additional context
Debug
Installation
Configuration