Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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-2.8.12.1-msvc9x64.tar.bz2 (7.2Mb): 7.2Mb downloaded
    Running setup.py 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/setup.py'
      Complete output from command python setup.py 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/setup.py'
    
  2. I also tried sudo port install py27-wxpython after installing MacPorts, and got:

    --->  Computing dependencies for py27-wxpython
    --->  Building py27-wxpython
    Error: org.macports.build 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:
        http://guide.macports.org/#project.tickets
    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 has been asked before and already has an answer. If those answers do not fully address your question, please ask a new 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

1 Answer 1

try downloading an installer: http://downloads.sourceforge.net/wxpython/wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7.dmg

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.