HyukjinKwon commented on a change in pull request #29781:
URL: https://github.com/apache/spark/pull/29781#discussion_r489987359



##########
File path: python/docs/source/development/setting.rst
##########
@@ -0,0 +1,58 @@
+..  Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+..    http://www.apache.org/licenses/LICENSE-2.0
+
+..  Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+==================
+Setting up PySpark
+==================
+
+This section describes how to setup PySpark on PyCharm.
+It guides step by step to the process of downloading the source code from 
GitHub and running the test code successfully.
+
+Firstly, download the Spark source code from GitHub using git url. You can 
download the source code by simply using ``git clone`` command as shown below.
+If you want to download the code from any forked repository rather than spark 
original repository, please change the url properly.
+
+.. code-block:: bash
+
+    $ git clone https://github.com/apache/spark.git
+
+When the download is completed, go to the ``spark`` directory and build the 
package.
+SBT build is generally much faster than others. More details about the build 
are documented `here 
<https://spark.apache.org/docs/latest/building-spark.html>`_.
+
+.. code-block:: bash
+
+    $ ./build/sbt package
+
+After building is finished, run PyCharm and select the path ``spark/python``.
+
+.. image:: ../../../../docs/img/pycharm-with-pyspark1.png
+    :alt: Setup PyCharm with PySpark
+
+
+Let's go to the path ``python/pyspark/tests`` in PyCharm and try to run the 
any test like ``test_join.py``.
+You might can see the ``KeyError: 'SPARK_HOME'`` because the environment 
variable has not been set yet.
+
+Go **Run -> Edit Configurations**, and set the environment variables as below.
+Please make sure to specify your own path for ``SPARK_HOME`` rather than 
``/.../spark``. After completing the variable, click **Apply** to apply the 
changes.

Review comment:
       Looks like the image has to be updated too




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to