Question: I could run PySpark from the terminal line and everything works fine.

```
~/spark-1.0.0-bin-hadoop1/bin$ ./pyspark

```

Welcome to

```

      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /__ / .__/\_,_/_/ /_/\_\   version 1.0.0
      /_/

```

Using Python version 2.7.6 (default, May 27 2014 14:50:58)

However when I try to this on a Python IDE

```
import pyspark

```

> 
> ImportError: No module named pyspark
> 
> 
> 

How do I import it like other Python libraries such numpy, scikit etc.?

Working in the terminal works fine, I just wanted to work in the IDE.

Answer: 
Thanks [Ophir YokTon](https://stackoverflow.com/users/590335/ophir-yoktan)'s upper post, I Finally managed to do it with "Spark 1.4.1+ Spyder2.3.4.

Here I would like to give one summary on all my steps to do it, hope it can help some people in the similiar situations. 

1. Add PYTHONPATH variable into .bashrc. (of course you can put into other relavent profile file)

> 
> 
> ```
> export PYTHONPATH=$SPARK_HOME/python/:$PYTHONPATH
> 
> export PYTHONPATH=$SPARK_HOME/python/lib/py4j-0.8.2.1-src.zip:$PYTHONPATH
> 
> ```
> 
> 

2. Make it effective by

> 
> 
> ```
> source .bashrc
> 
> ```
> 
> 

3. Create one copy of spyder as spyder.py on your spyder bin directory

> 
> 
> ```
> cp spyder spyder.py
> 
> ```
> 
> 

4. Start Spyder IDE with following command

> 
> 
> ```
> spark-submit spyder.py
> 
> ```
> 
> 

I implemented [the sample "simple app" from apache spark](https://spark.apache.org/docs/latest/quick-start.html) and passed the running test it in spyder environment. please refer to the picture "<http://i.stack.imgur.com/xTv6s.gif>"
pyspark isn't probably at your pythonpath variable. Go to location where pyspark folder is located and add that folder to your class path.