First steps with Python
This pages outlines what you need to do to get started with Python. Thankfully, Python is easy to learn and by following these steps, you should become a productive Pythonista in no time.
Download and install EPD
For scientific computing applications, the best way to get Python is to download and install the Enthought Python Distribution (EPD). Most importantly, the academic version of EPD is free.
Install the IPython notebook
Once EPD is installed on your system, you can install the IPython notebook, which is the recommended environment for working with Python. To install the notebook, run the following commands at the command prompt:
easy_install tornado
easy_install http://github.com/ipython/ipython/tarball/master
To run the notebook, open the command prompt, change directories to the location you want to store notebook files and run:
ipython notebook --pylab=inline
Now point your web browser to the location http://127.0.0.1:8888 and you are ready to start learning Python. On recent versions of IPython, starting the notebook will automatically open your web browser to the correct location.
Learn Python
Next, it is time to learn Python itself. Here are the best introductory books out there:
- Allen B. Downey’s Think Python
- Zed Shaw’s Learn Python the Hard Way
Also of great use is the documentation on Python’s website.
Second steps with Python
Once you have some experience in using Python, you can start to take the next steps.
Download and install a text editor
For editing longer scripts, you will want to use a full blown, plain text editor such as:
- Notepad++ for Windows.
- TextWrangler or XCode for Mac OS X.
- Cloud9ide for online coding.
- gedit for Linux.
Learn more about specific Python packages
- NumPy and SciPy documentation
- SymPy documentation
- Matplotlib documentation
- NetworkX documentation
Download Git and create a GitHub account
Git is magic. It lets you write code with large groups of people who are distributed over the surface of the planet.
Social
Categories