( jur - nay - sic ) Entrepreneur / Software Engineer

Python Mac Error: IOError: [Errno 2] No such file or directory …__init__.py

This is a situation that I have come upon in Mac OS X Mountain Lion:

For whatever reason this file is basically missing from the Python install by default.  We will not talk about why for Apple has always seemed to install bad versions of Python.

Python needs the __init__.py file to know that it should look inside the folder for code.  To fix this error, enter this command:

And that should resolve the issue.

Follow Us

Follow our activity on the web and get to know us.