Skip to content

[DOCS] add section for running pyspark with uv inline dependencies#54549

Open
markjm wants to merge 1 commit intoapache:masterfrom
markjm:markjm/python-docs
Open

[DOCS] add section for running pyspark with uv inline dependencies#54549
markjm wants to merge 1 commit intoapache:masterfrom
markjm:markjm/python-docs

Conversation

@markjm
Copy link

@markjm markjm commented Feb 28, 2026

What changes were proposed in this pull request?

Added a doc section for running pyspark commands with uv run. I do think it may be valuable to figure out a way to allow setting PYSPARK_PYTHON to a "composite" value (which has an executable + command) maybe, but this way works well.

I have found this approach to be especially valuable in an environment with heterogenous python dependencies across a large organization. We have a "base" set of dependencies ambiently available to pyspark via installation in our docker container, but this allows applying changes or additions for specific use-cases.

I did not include much information about locking dependencies or other information and instead would rely on the uv run docs I linked to guide that part.

Why are the changes needed?

They are not needed, but I figured I'd share back to the docs something which has worked well for me.

Does this PR introduce any user-facing change?

no

How was this patch tested?

I tried to build the docs with the dependencies in dev/requirements.txt but could not. I resorted to using those versions and directly running

rst2html.py --halt=severe python/docs/source/tutorial/python_packaging.rst

Note: I also removed a trailing ; in dev/requirements.txt which caused uv pip install to fail.

Was this patch authored or co-authored using generative AI tooling?

No

@markjm markjm force-pushed the markjm/python-docs branch 3 times, most recently from 64be50b to 2767621 Compare February 28, 2026 01:06
@markjm markjm force-pushed the markjm/python-docs branch from 2767621 to b5261fe Compare February 28, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant