> For the complete documentation index, see [llms.txt](https://docs.invariant.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.invariant.io/data-science/apache-spark/pyspark-setup.md).

# PySpark Setup

PySpark is included with Spark. Use this for local usage or as a client to connect to a cluster instead of setting up a cluster itself. For regular users, use the Invariant JupyterLab build.

Install pyspark by using pyPI in the newly created environment. This will install PySpark under the new virtual environment.

```
pip install pyspark
```

Alternatively, install PySpark from Conda

```
conda install pyspark
```

For more details about the API, refer to [Apache Spark](https://spark.apache.org/docs/latest/api/python/getting_started/index.html) website&#x20;
