I have spent quite a bit of time over the past few weeks trying to see how development will fit into the course of my career moving forward. With the help of some great people like Matt Stone and Matt Oswalt I am charging ahead with Python. This post is about setting up my Mac to be ready to start coding. Sure I have the default install of Python installed but I have seen that I need more of an IDE than what is provided by default. Watching Matt Stone code in VIM I was impressed but I have just never spent enough time in VIM to be comfortable. So I am going to go with Atom and extend it to meet my requirements. What follows will be that process.
Brew:
OSX is a bit of a hassle when it comes to application management. A solid package manager solves that. Now I can’t say how good Brew is I can say it has lots of fans and it seems to work for what I need.
So start by installing Brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
With Brew installed now we can use it to setup Python. I had a few issues but its because I had tried some other install steps that broke the Brew Process. Once I fixed those it was easy.
So Just do the following to install Python 2.7.x
brew install python
Sublime Text:
As you can see I have updated this post to show Sublime Text as my IDE. I really wanted to love Atom but it just had a bunch of random issues that I could not work around. Since moving to Sublime Text all those issues have vanished.
So start with Download Sublime Text from here.
After you install and run Sublime Text you should check out this superb writeup at RealPython.com on how to turn Sublime into a full featured IDE for Python. This is what I use and while it is has things I don’t need right now, it is so close to perfect there is no reason for me to mess it up by trying to edit it down. Just follow it and then your good to go.
Thats about it. From there open up any .py file and you should see any of the PEP8 markers no the left side and all the python syntax broken out.
With that done you have a base of what you need for for development for Python in OSX. I have had help from the following sites pulling all this together.
https://realpython.com/blog/python/setting-up-sublime-text-3-for-full-stack-python-development/
http://hackercodex.com/guide/python-development-environment-on-mac-osx/