First, your observation
I tried doing this:
brew switch python3 3.3.0.
Still didn't work. Any ideas?
is not a bug, it's a feature. Homebrew's idea is to allow Python 2.7.x and 3.x to live side-by-side. Obviously, the can't both be python, so Python 3 is python3. With the switch command, you just switch which version of brew's python3 package you are using (i.e. your python3 will point to Python 3.3.0), but it does nothing for the Mac or your paths.
Now, all the brewed binaries are symlinks in /usr/local/bin, so theoretically you could change all the python symlinks by hand to point to python3 instead of Python 2. I do not recommend that, though, as it will probably break homebrew completely, or will be reverted by future Python updates.
Instead, use the excellent virtualenv: "http://www.virtualenv.org/".
Install it:
pip3 install virtualenv
You will see the message "Installing virtualenv script to /usr/local/share/python3", so add this to your PATH.
If you call virtualenv without any parameter, you will get a help message. Among other things, you will see:
-p PYTHON_EXE, --python=PYTHON_EXE
The Python interpreter to use, e.g.,
--python=python2.5 will use the python2.5 interpreter
to create the new environment. The default is the
interpreter that virtualenv was installed with
(/usr/local/Cellar/python3/3.3.0/bin/python3.3)
So you're lucky, the python you want is already the default. So
- virtualenv myproject
- cd myproject
- source bin/activate
python
Python 3.3.0 (default, Mar 18 2013, 16:59:10)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.24)] on darwin
Does this help, or can you not use virtualenv for some reason?
If virtualenv is not an option and you definitely want Python 3 and only Python 3 for all your Python needs on your Mac, you might consider not using the homebrewed python, but rather installing the python.org distribution.