Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6761585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:12:38+00:00 2026-05-26T14:12:38+00:00

I am having some trouble triggering the 32-bit python for my macports python2.7 calvins-MacBook

  • 0

I am having some trouble triggering the 32-bit python for my macports python2.7

calvins-MacBook ttys003 Tue Nov 01 01:04:23 |~|
calvin$ arch -arch x86_64 python
Python 2.7.2 (default, Oct 31 2011, 20:10:35) 
[GCC 4.2.1 Compatible Apple Clang 3.0 (tags/Apple/clang-211.10.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform; platform.architecture()
('64bit', '')
>>> exit()
calvins-MacBook ttys003 Tue Nov 01 01:04:49 |~|
calvin$ arch -arch i386 python
Python 2.7.2 (default, Oct 31 2011, 20:10:35) 
[GCC 4.2.1 Compatible Apple Clang 3.0 (tags/Apple/clang-211.10.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform; platform.architecture()
('64bit', '')
>>> 

How should I go about triggering the use of 32-bit python?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:12:38+00:00Added an answer on May 26, 2026 at 2:12 pm
    arch -i386 python
    

    Will run the binary in 32-bit mode (which is what you did).

    If you installed Python via MacPorts, check that it was actually built with 32-bit and 64-bit (universal binary).

    file `which python`
    

    This is output on mine:

    λ > file /usr/local/bin/python
    /usr/local/bin/python: Mach-O universal binary with 2 architectures
    /usr/local/bin/python (for architecture i386):  Mach-O executable i386
    /usr/local/bin/python (for architecture x86_64):    Mach-O 64-bit executable x86_64
    

    If you don’t see the i386, then you your version doesn’t have a 32-bit build.

    Though if you can run arch -i386 python you should be fine, since you will get an error if your binary can’t run 32-bit mode.


    Also, do not rely on platform.architecture() to tell you if it’s 32-bit, because universal binaries will report 64-bit mode even if you’re in 32-bit. It’s better to rely on sys.maxsize, which changes depending on if you’re in 32-bit or 64-bit mode.

    Python in 32-bit mode, notice sys.maxsize > 2**32:

    λ > arch -i386 python
    Python 2.7.2 (default, Oct 31 2011, 00:51:07) 
    [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sys
    >>> sys.maxsize > 2**32
    False
    >>> sys.maxsize
    2147483647
    >>> import platform
    >>> platform.architecture()
    ('64bit', '')
    

    Python in 64-bit mode:

    λ > python
    Python 2.7.2 (default, Oct 31 2011, 00:51:07) 
    [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sys
    >>> sys.maxsize
    9223372036854775807
    >>> sys.maxsize > 2**32
    True
    >>> import platform
    >>> platform.architecture()
    ('64bit', '')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having some trouble with what should be a very simple scenario. For example purposes,
Hey having some trouble trying to maintain transparency on a png when i create
Basically having some trouble with using Hover to hide or show an item. The
Been having some trouble implementing a single-column index in LaTeX. I've been employing the
Im having some trouble with an oracle database. Every time i try to connect,
I´m having some trouble retrieving a collection of strings in a projection: say that
Im having some trouble writing a getstring function, this is what I have so
I am having some trouble with the Google Maps API . I have an
I'm having some trouble importing and accessing a private key with the ASPNET user.
I'm having some trouble getting log4net to work from ASP.NET 3.5. This is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.