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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:54:42+00:00 2026-05-30T19:54:42+00:00

I am running OS X Lion (started on Leopard, and have gone through two

  • 0

I am running OS X Lion (started on Leopard, and have gone through two upgrades). OS X Lion comes with Python 2.7. At some point, I thought Python and its packages were working together (possibly before my upgrade with Lion).

I can run Python as a non-superuser. However, when I import packages or try running easy_install, for example, I get the following error.

system:distutils $ python
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import zope
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/zope/__init__.py", line 1, in <module>
    __import__('pkg_resources').declare_namespace(__name__)
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 698, in <module>
    class Environment(object):
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 701, in Environment
    def __init__(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR):
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 96, in get_supported_platform
    plat = get_build_platform(); m = macosVersionString.match(plat)
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 222, in get_build_platform
    plat = get_platform()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/util.py", line 165, in get_platform
    "Don't know machine value for archs=%r"%(archs,))
ValueError: Don't know machine value for archs=()
>>> ^D
system:distutils $

When I run it as root or as sudo, everything works fine. All of the directories and files have 0755 or 0644 permissions, respectively.

What should the permissions be for Python and its packages on OS X Lion so you can use it as a normal user? Is the way my permissions are currently configured the default, or did I mess up the permissions along the way.

I realize I can go through the /System/Library/… and the /Library/Python/… directories and change the ownership and permission to me. But that does not seem like that is the correct solution.

  • 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-30T19:54:43+00:00Added an answer on May 30, 2026 at 7:54 pm

    After struggling for a while, and getting repeatedly frustrated, I figured out two reasons easy_install could fail with this error.

    1. I need to have XCode installed (which I already did)
    2. I simply went through the code in util.py to find the line that produced the error, and changed the result.

    This worked perfectly. I now never receive that error. I have put the diff below for the solution. Please note, I chose 'intel' for the machine type, because with OS X Lion, all PPC support is removed.

    I hope this helps someone else.

    wintermute:distutils $ pwd
    /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils
    wintermute:distutils $ diff -U 5  util.py.bad util.py
    --- util.py.bad 2012-03-03 15:30:39.000000000 -0500
    +++ util.py 2012-03-03 15:32:21.000000000 -0500
    @@ -159,12 +159,13 @@
                     elif archs == ('ppc64', 'x86_64'):
                         machine = 'fat64'
                     elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'):
                         machine = 'universal'
                     else:
    -                    raise ValueError(
    -                       "Don't know machine value for archs=%r"%(archs,))
    +                    machine = 'intel'
    +                    #raise ValueError(
    +                    #   "Don't know machine value for archs=%r"%(archs,))
    
                 elif machine == 'i386':
                     # On OSX the machine type returned by uname is always the
                     # 32-bit variant, even if the executable architecture is
                     # the 64-bit variant
    wintermute:distutils $ 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Mac running Lion and Python 2.7.1. I am noticing something very
I get this error when running on OX Lion: brew install python Error: MD5
I have a Mac running Lion. Before I did a clean install of Lion,
I have a Mac running Lion and I just downloaded latest version of apache.
I have some css code that mimics Lion/iOS style scrollbars (like Twitter website). However,
I have succesfully installed Doxygen and GraphViz on my mac (running Lion OS), but
Running OS X Leopard an MacBook Pro from Jan. 2008. I used to run
Running ipconfig /all shows a Teredo Tunneling Pseudo-Interface. What is that? Does this have
Running into a problem. I have a table defined to hold the values of
Just upgraded a MBP 2009 from Snow Leopard to Lion. MySQL seems to be

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.