-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-32180][PYTHON][DOCS] Installation page of Getting Started in PySpark documentation #29640
[SPARK-32180][PYTHON][DOCS] Installation page of Getting Started in PySpark documentation #29640
Conversation
Hi @HyukjinKwon, As per your suggestion, I have made the necessary changes. Please have a look at it.
Please let me know your thoughts and apologize for making you review this document multiple times. |
ok to test |
Test build #128271 has finished for PR 29640 at commit
|
Installation | ||
============ | ||
|
||
The official release channel is to download it from `the Apache Spark website <https://spark.apache.org/downloads.html>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Official releases are available from ..."
|
||
conda activate pyspark_env | ||
|
||
In lower Conda version, the following command might be used: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In earlier Conda versions ... should be used:
(earlier than what?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @srowen,
Based on the conda documentation the answer is "Conda version before 4.4".
The Source for this info is
conda activate: The logic and mechanisms underlying environment activation have been reworked. With conda 4.4, conda activate and conda deactivate are now the preferred commands for activating and deactivating environments. You'll find they are much more snappy than the source activate and source deactivate commands from previous conda versions. The conda activate command also has advantages of (1) being universal across all OSes, shells, and platforms, and (2) not having path collisions with scripts from other packages like Python virtualenv's activate script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I'm suggesting saying that here.
@HyukjinKwon and @srowen, Thanks for your review. @HyukjinKwon, I have updated all the changes you suggested. I have summited a commit with some of the changes. I will update other changes (corresponding to the comments) once both of you give a green signal. |
Test build #128318 has finished for PR 29640 at commit
|
Using Conda | ||
----------- | ||
|
||
Conda is an open-source package management and environment management system which is a part of `Anaconda <https://docs.continuum.io/anaconda/>`_ distribution. It is both cross-platform and language agnostic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
part of the
|
||
conda activate pyspark_env | ||
|
||
In Conda version earlier than 4.4, the following command might be used: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be used
|
||
source activate pyspark_env | ||
|
||
PySpark installation using ``pip`` under Conda environment is official. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean 'official' here?
|
||
pip install pyspark | ||
|
||
`PySpark at Conda <https://anaconda.org/conda-forge/pyspark>`_ is not the official release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, I don't think this matters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just say, for example:
Note that PySpark at Conda <https://anaconda.org/conda-forge/pyspark>
_ is available but not necessarily synced with PySpark release cycle because it is maintained by the community separately.
|
||
Ensure the ``SPARK_HOME`` environment variable points to the directory where the code has been extracted. | ||
Define ``PYTHONPATH`` such that it can find the PySpark and | ||
Py4J under ``$SPARK_HOME/python/lib``, one example of doing this is shown below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(By the way I think you need just single back-ticks?)
Start a new sentence at "One example"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh fyi double backticks here make it like a code block. single backtick makes italic for some reasons.
`Py4J` 0.10.9 Required | ||
============= ========================= ========================================================================== | ||
|
||
**Note**: A prerequisite for PySpark installation is the availability of JAVA 8 or later and ``JAVA_HOME`` properly set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JAVA -> Java
Nit: you can avoid a lot of these passive sentences. "PySpark requires Java 8 or later, with JAVA_HOME
properly set" for example.
============= ========================= ========================================================================== | ||
|
||
**Note**: A prerequisite for PySpark installation is the availability of JAVA 8 or later and ``JAVA_HOME`` properly set. | ||
For using JDK 11, set ``-Dio.netty.tryReflectionSetAccessible=true`` for Arrow related features and refer to `Downloading <https://spark.apache.org/docs/latest/#downloading>`_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If using Java 11, set ...
============= ========================= ========================================================================== | ||
`pandas` 0.23.2 Optional for SQL component | ||
`NumPy` 1.7 Required for ML component(Optional in PySpark if ML component is not used) | ||
`pyarrow` 0.15.1 Optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyarrow is also currently only Optional for SQL.
============= ========================= ========================================================================== | ||
Package Minimum supported version Note | ||
============= ========================= ========================================================================== | ||
`pandas` 0.23.2 Optional for SQL component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just write like:
Optional for SQL
Required for ML
Optional for SQL
Seems too long. Sorry for a bit of forth and back here.
Test build #128469 has finished for PR 29640 at commit
|
@HyukjinKwon and @srowen, I have made the suggested changes. Thanks for your review. |
Merged to master |
@srowen @rohitmishr1484 seems this commit is failing Python linter:
|
Weird - it passed the test run above. Let me take a look and patch it. |
This simply fixes an .rst generation error in #29640 Closes #29735 from srowen/SPARK-32180.2. Authored-by: Sean Owen <srowen@gmail.com> Signed-off-by: Takuya UESHIN <ueshin@databricks.com>
This simply fixes an .rst generation error in apache/spark#29640 Closes #29735 from srowen/SPARK-32180.2. Authored-by: Sean Owen <srowen@gmail.com> Signed-off-by: Takuya UESHIN <ueshin@databricks.com>
What changes were proposed in this pull request?
This PR proposes to add getting started- installation to new PySpark docs.
Why are the changes needed?
Better documentation.
Does this PR introduce any user-facing change?
No. Documentation only.
How was this patch tested?
Generating documents locally.