os x compile, install?

Discussion in 'Python' started by Rob, Apr 28, 2010.

  1. Rob

    Rob Guest

    Hi,

    Python on my system is behaving badly, so I want to create a new
    install from source code. I have OS X 10.6.2, I downloaded the source
    code (Python-2.6.5.tar.bz2) and did the usual, ./configure, make, sudo
    make install. Build went fine. But on install, why is it putting
    things is my home directory?

    [...]
    running build_scripts
    running install_lib
    creating /Users/rob/Library/Python
    creating /Users/rob/Library/Python/2.6
    creating /Users/rob/Library/Python/2.6/site-packages
    copying build/lib.macosx-10.4-x86_64-2.6/_AE.so -> /Users/rob/Library/
    Python/2.6/site-packages
    copying build/lib.macosx-10.4-x86_64-2.6/_AH.so -> /Users/rob/Library/
    Python/2.6/site-packages
    copying build/lib.macosx-10.4-x86_64-2.6/_App.so -> /Users/rob/Library/
    Python/2.6/site-packages
    [...]

    Later, this causes imports that require those .so files to fail. For
    example...

    RobsMac Python-2.6.5 $ python
    Python 2.6.5 (r265:79063, Apr 28 2010, 13:40:18)
    [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import zlib

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named zlib

    What is going on?

    thanks,
    Rob
     
    Rob, Apr 28, 2010
    #1
    1. Advertising

  2. Rob

    Rob Guest

    On Apr 28, 2:09 pm, Rob <> wrote:
    > Hi,
    >
    > Python on my system is behaving badly, so I want to create a new
    > install from source code.  I have OS X 10.6.2, I downloaded the source
    > code (Python-2.6.5.tar.bz2) and did the usual, ./configure, make, sudo
    > make install.  Build went fine.  But on install, why is it putting
    > things is my home directory?


    Doh! Nevermind... I had created a ~/.pydistutils.cfg file a
    couple weeks ago, for some stupid reason I can't remember. I forgot
    to delete that file. It's contents were:

    [install]
    install_lib = ~/Library/Python/$py_version_short/site-packages
    install_scripts = ~/bin

    So it was overriding the normal setup.py behavior.

    Rob
     
    Rob, Apr 28, 2010
    #2
    1. Advertising

  3. On Wed, Apr 28, 2010 at 4:35 AM, Rob <> wrote:
    > On Apr 28, 2:09 pm, Rob <> wrote:
    >> Hi,
    >>
    >> Python on my system is behaving badly, so I want to create a new
    >> install from source code.  I have OS X 10.6.2, I downloaded the source
    >> code (Python-2.6.5.tar.bz2) and did the usual, ./configure, make, sudo
    >> make install.  Build went fine.  But on install, why is it putting
    >> things is my home directory?

    >
    > Doh!  Nevermind...  I had created a ~/.pydistutils.cfg file a
    > couple weeks ago, for some stupid reason I can't remember.  I forgot
    > to delete that file.  It's contents were:
    >
    > [install]
    > install_lib = ~/Library/Python/$py_version_short/site-packages
    > install_scripts = ~/bin
    >
    > So it was overriding the normal setup.py behavior.
    >
    > Rob




    On OS X, you're probably going to want to do a Framework install
    instead of just a normal build. (If you don't do this, you won't be
    able to make a GUI).

    ../configure --enable-framework
    make
    sudo make install

    That will generate the app bundles for you (IDLE, Python Launcher, and
    so on) and make a framework in /Library/Frameworks. For more
    information about the Mac-specific options, look at the README inside
    the Mac folder of the source.
     
    Benjamin Kaplan, Apr 28, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nagaraj
    Replies:
    1
    Views:
    924
    Lionel B
    Mar 1, 2007
  2. timjowers
    Replies:
    7
    Views:
    4,420
    heyjude
    Feb 2, 2011
  3. Replies:
    1
    Views:
    471
    Cowboy \(Gregory A. Beamer\)
    Apr 11, 2008
  4. Carter
    Replies:
    2
    Views:
    532
    Carter
    Mar 4, 2009
  5. fAnSKyer
    Replies:
    2
    Views:
    569
    Alf P. Steinbach
    Jun 7, 2009
Loading...

Share This Page