Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
installing wxpython via pip or easy_install

I'm very new to Python and using the terminal, and I'm having a lot of trouble downloading wxpython. I'm using Mac OS X Lion, the most recent version, and I've tried two methods:

  1. If I try sudo pip install wxpython, I get:

    Downloading/unpacking wxpython
    Downloading wxPython2.8-win64-devel- (7.2Mb): 7.2Mb downloaded
    Running egg_info for package wxpython
      Traceback (most recent call last):
        File "<string>", line 14, in <module>
      IOError: [Errno 2] No such file or directory: '/Users/michelletyler1/build/wxpython/'
      Complete output from command python egg_info:
      Traceback (most recent call last):
    File "<string>", line 14, in <module>
    IOError: [Errno 2] No such file or directory: '/Users/michelletyler1/build/wxpython/'
  2. I also tried sudo port install py27-wxpython after installing MacPorts, and got:

    --->  Computing dependencies for py27-wxpython
    --->  Building py27-wxpython
    Error: for port py27-wxpython returned: command execution failed
    Please see the log file for port py27-wxpython for details:
       /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarbal        ls_ports_python_py-wxpython/py27-wxpython/main.log
    To report a bug, follow the instructions in the guide:
    Error: Processing of port py27-wxpython failed

Also, I've been trying to figure out how to change my $PATH so that /usr/local/bin is ahead of /usr/bin (as advised by brew doctor), but when I go to edit my ~/.profile (what I've gathered I'm supposed to do from what I've found online so far), it doesn't work.

Thanks for the help!

share|improve this question

marked as duplicate by slhck, KronoS, Oliver Salzburg, Canadian Luke, soandos Jun 18 '12 at 5:21

This question was marked as an exact duplicate of an existing question.

Do you have a .bash_profile file as well? If that exists, .profile is never read. So you'd need to edit the former. Also, what does the log from your port install command say? Note that you preferably shouldn't use both Homebrew and MacPorts simultaneously. brew doctor should have told you that. – slhck Jun 11 '12 at 16:12

try downloading an installer:

Also, make sure you run your python code in 32 bit mode... i.e.

#!/usr/bin/env python-32

import wx
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.