title: PyCharm can't find 'SPARK_HOME' when imported from a different file
body: <p>I've two files.</p>
  
  <blockquote>
    <p>test.py</p>
  </blockquote>
  
  <pre><code>from pyspark import SparkContext
  from pyspark import SparkConf
  from pyspark import SQLContext
  
  
  class Connection():
      conf = SparkConf()
      conf.setMaster("local")
      conf.setAppName("Remote_Spark_Program - Leschi Plans")
      conf.set('spark.executor.instances', 1)
      sc = SparkContext(conf=conf)
      sqlContext = SQLContext(sc)
      print ('all done.')
  
  con = Connection()
  </code></pre>
  
  <blockquote>
    <p>test_test.py</p>
  </blockquote>
  
  <pre><code>from test import Connection
  
  sparkConnect = Connection()
  </code></pre>
  
  <p>when I run test.py the connection is made successfully but with test_test.py it gives</p>
  
  <p><br/>raise KeyError(key)
  <br/>KeyError: 'SPARK_HOME'</p>