title: How to fix "ImportError: PyArrow >= 0.8.0 must be installed; however, it was not found."?
body: <p>I use PySpark 2.4.0 and when I executed the following code in <code>pyspark</code>:</p>
  
  <pre><code>$ ./bin/pyspark
  Python 2.7.16 (default, Mar 25 2019, 15:07:04)
  ...
  Welcome to
        ____              __
       / __/__  ___ _____/ /__
      _\ \/ _ \/ _ `/ __/  '_/
     /__ / .__/\_,_/_/ /_/\_\   version 2.4.0
        /_/
  
  Using Python version 2.7.16 (default, Mar 25 2019 15:07:04)
  SparkSession available as 'spark'.
  &gt;&gt;&gt; from pyspark.sql.functions import pandas_udf
  &gt;&gt;&gt; from pyspark.sql.functions import pandas_udf, PandasUDFType
  &gt;&gt;&gt; from pyspark.sql.types import IntegerType, StringType
  &gt;&gt;&gt; slen = pandas_udf(lambda s: s.str.len(), IntegerType())
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/Users/x/spark/python/pyspark/sql/functions.py", line 2922, in pandas_udf
      return _create_udf(f=f, returnType=return_type, evalType=eval_type)
    File "/Users/x/spark/python/pyspark/sql/udf.py", line 47, in _create_udf
      require_minimum_pyarrow_version()
    File "/Users/x/spark/python/pyspark/sql/utils.py", line 149, in require_minimum_pyarrow_version
      "it was not found." % minimum_pyarrow_version)
  ImportError: PyArrow &gt;= 0.8.0 must be installed; however, it was not found.
  </code></pre>
  
  <p>How to fix it?</p>