Home Download Buy Blog Forum Support

64-bit python error on application open

64-bit python error on application open

Postby mlunoe on Wed Nov 16, 2011 6:47 pm

Hi there!

I really want to try out your Sublime Text 2 editor, but I it seems that I cannot get it to work. I know its a beta version, but I want to try out the new stuff :)

As you can see, in the test below, I am running python 2.6 64-bit, so I don't understand why I get this failure, see error message below. I have tried to prefer python 32-bit and then launching the application again, but the error remains. Finally I tried to run the following without getting any errors:
Code: Select all
python /Applications/Sublime\ Text\ 2.app/Contents/MacOS/PackageSetup.py


So I think the problem is how do I set my system to run applications with python in 64-bit?

My OS: Mac OSX 10.6.8

Test:
Code: Select all
usr$ python
Python 2.6.7 (r267:88850, Nov 16 2011, 09:41:02)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform, sys
>>> platform.architecture()
('64bit', '')


Error message:
Code: Select all
Unable to run package setup:

Failed to load module

Traceback (most recent call last):
  File "./PackageSetup.py", line 7, in <module>
    import zipfile
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/zipfile.py", line 4, in <module>
    import struct, os, time, sys, shutil
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/struct.py", line 1, in <module>
    from _struct import *
ImportError: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_struct.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)
mlunoe
 
Posts: 1
Joined: Wed Nov 16, 2011 4:52 pm

Re: 64-bit python error on application open

Postby jps on Thu Nov 17, 2011 10:10 pm

Have you modified your system version of Python? Try running this, and check you get the same output:

Code: Select all
$ file /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_struct.so
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_struct.so: Mach-O fat file with 2 architectures
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 21 guests

cron