Note that there are some explanatory texts on larger screens.

plurals
  1. POProper permissions for Python and packages on OS X Lion
    text
    copied!<p>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).</p> <p>I can run Python as a non-superuser. However, when I import packages or try running <code>easy_install</code>, for example, I get the following error.</p> <pre><code>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. &gt;&gt;&gt; import zope Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/zope/__init__.py", line 1, in &lt;module&gt; __import__('pkg_resources').declare_namespace(__name__) File "build/bdist.linux-i686/egg/pkg_resources.py", line 698, in &lt;module&gt; 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=() &gt;&gt;&gt; ^D system:distutils $ </code></pre> <p>When I run it as root or as <code>sudo</code>, everything works fine. All of the directories and files have <code>0755</code> or <code>0644</code> permissions, respectively.</p> <p>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.</p> <p><em>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.</em></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload