安装py4j
配置pycharm 在PYTHON_HOMElibsite-packages下新建pyspark.pth文件内容为: D:programspark-1.5.1-bin-hadoop2.4python
试运行