MAC (mountain lion) + eclipse + Python + wxpython + pydv Development Environment setup

Source: Internet
Author: User

1. Try to install wxpython today and enter Python and import wx. the following error is returned:

File "guitest. py", line 2, in <module>
Import WX
File "/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/Site-packages/wx-2.8-mac-unicode/wx/_ init _. py", line 45, in <module>
From wx. _ core import *
File "/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/Site-packages/wx-2.8-mac-unicode/wx/_ core. py", line 4, in <module>
Import _ core _
Importerror: dlopen (/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/Site-packages/wx-2.8-mac-unicode/wx/_ core _. so, 2): no suitable image found. did find:
/Usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/Site-packages/wx-2.8-mac-unicode/wx/_ core _. So: no matching architecture in universal wrapper

If you run Python-32 and then import wx, no error will be reported!

At first glance, we know that wx is 32-bit! For the mountain lion at this time, 64 is the system!

There are many solutions!

Finally, I searched by Google: Download a wxpython Based on the cocoa API, so you don't have to worry about the architecture.

:

Wxpython 2.9: http://downloads.sourceforge.net/wxpython/wxPython2.9-osx-2.9.4.0-cocoa-py2.7.dmg

Finally, I ran a test code: the test was successful! :

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.