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 8070111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:17:19+00:00 2026-06-05T13:17:19+00:00

On OSX, I have a Python universal binary which just contains 32-bit code: $

  • 0

On OSX, I have a Python universal binary which just contains 32-bit code:

$ file $(python3.2-32)
/Library/Frameworks/Python.framework/Versions/3.2/bin/python3.2-32: Mach-O universal binary with 1 architecture
/Library/Frameworks/Python.framework/Versions/3.2/bin/python3.2-32 (for architecture i386): Mach-O executable i386

I create a virtualenv using this binary:

$ virtualenv -p python3.2-32 myenv
Running virtualenv with interpreter /Library/Frameworks/Python.framework/Versions/3.2/bin/python3.2-32
New python executable in myenv/bin/python
Please make sure you remove any previous custom paths from your /Users/jhartley/.pydistutils.cfg file.
Installing distribute........................................................................................................................................................................done.
Installing pip...............done.

But the virtualenv contains a binary with both 32 and 64 bit code:

$ . myenv/bin/activate
(myenv)$ file $(which python)
/Users/jhartley/myenv/bin/python: Mach-O universal binary with 2 architectures
/Users/jhartley/myenv/bin/python (for architecture i386):   Mach-O executable i386
/Users/jhartley/myenv/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64

I need to use a Python binary which contains just 32 bit code, not 64 bit.

I don’t mind it being a universal binary, just so long as it runs in 32 bit mode by default, without me having to invoke it using ‘arch -i386’, since I’m not in control of how this application gets launched.

  • 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-06-05T13:17:20+00:00Added an answer on June 5, 2026 at 1:17 pm

    I’m not exactly sure why this behavior is happening, but I can offer a workaround. You could just strip the virtualenv’s python down to i386 one time. Then it would no longer require an environment flag to ensure 32-bit:

    source bin/activate
    file `which python`
    # .../bin/python: Mach-O universal binary with 2 architectures
    # .../bin/python (for architecture i386):   Mach-O executable i386
    # .../bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64
    lipo -thin i386 `which python` -output `which python`
    file `which python`
    # .../bin/python: Mach-O executable i386
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python application which uses a compiled shared library. This library for
I have a bundle file on osx with a .stack extension. eg test.stack. Normally
I have to develop a dashboard widget for Mac Osx to support 32/64 bit
I have a relatively simple application which I need to make native Mac OSX
I'm using Subversion to checkin a file on OSX. I have my EDITOR variable
I'm running Mac OSX. Until today I had Python 2.6 with psycopg2 running just
I have a Python script which needs to calculate the exact size of arbitrary
I have a python (v2.7.2 on OSX Lion) script that unzips an archive into
I am running OSX Lion and have installed python2.7 from python.org (this distribution can
I have two versions of python installed on my mac running OSX Lion. 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.