title: Read avro files in pyspark with PyCharm
body: <p>I'm quite new to spark, I've imported pyspark library to pycharm venv and write below code:</p>
  
  <pre><code># Imports
  from pyspark.sql import SparkSession
  
  # Create SparkSession
  spark = SparkSession.builder \
      .appName('DataFrame') \
      .master('local[*]') \
      .getOrCreate()
  
  spark.conf.set("spark.sql.shuffle.partitions", 5)
  path = "file_path"
  df = spark.read.format("avro").load(path)
  </code></pre>
  
  <p>, everything seems to be okay but when I want to read avro file I get message:</p>
  
  <blockquote>
    <p>pyspark.sql.utils.AnalysisException: 'Failed to find data source: avro. Avro is built-in but external data source module since Spark 2.4. Please deploy the application as per the deployment section of "Apache Avro Data Source Guide".;'</p>
  </blockquote>
  
  <p>When I go to this page: ><a href="https://spark.apache.org/docs/latest/sql-data-sources-avro.html" rel="nofollow noreferrer">https://spark.apache.org/docs/latest/sql-data-sources-avro.html</a> there is something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/piWsZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/piWsZ.png" alt="enter image description here"></a></p>
  
  <p>and I have no idea have to implement this, download something in PyCharm or you have to find external files to modify?</p>
  
  <p>Thank you for help! </p>
  
  <p><strong>Update (2019-12-06):</strong>
  Because I'm using Anaconda I've opened Anaconda prompt and copied this code:</p>
  
  <pre><code>pyspark --packages com.databricks:spark-avro_2.11:4.0.0
  </code></pre>
  
  <p>It downloaded some modules, then I've got back to PyCharm and same error appears.</p>