Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Tuesday, November 27, 2012

Installing PIL on a Mac

After much torment, and many failures, PIL is now installed. And, it is embarrassing just how simple it ended up being. I'm leaving this here so when I move to my next dev box, I don't spend three days figuring out again.

At the time of this writing, I was running OSX 10.8.2 but I'm sure this will work on earlier versions and probably subsequent versions for some time.

1. Open Terminal
2. Type: sudo easy_install pip
3. Type: sudo pip install PIL

Thanks to klobucar at StackOverflow for his answer regarding installing PIP.


Tuesday, April 10, 2012

Delete all pyc files

Scenario: You've just pushed a slew of compiled python files 
Solution:
1. Terminal into your project directory
2. Enter: 'find . -type f -name "*.pyc" -delete;' (without the quotes)
3. Add a .gitignore file to the root of your project with '*.pyc' as its content
4. Re-push the project