Compiling/Installing Python 2.7 on OSX 10.6

Jeremy jlconlin at gmail.com
Thu Nov 4 15:33:04 EDT 2010


On Nov 4, 1:23 pm, Ned Deily <n... at acm.org> wrote:
> In article
> <3d9139ae-bd6f-4567-bb02-b21a8ba86... at o15g2000prh.googlegroups.com>,
>
>
>
>
>
>  Jeremy <jlcon... at gmail.com> wrote:
> > I'm having trouble installing Python 2.7 on OSX 10.6  I was able to
> > successfully compile it from source, but ran into problems when I did
> > make install.  The error I got (I received many similar errors) was:
>
> > /usr/bin/install -c -m 644 ../LICENSE /home/jlconlin/Library/
> > Frameworks/Python.framework/Versions/2.7/lib/python2.7/LICENSE.txt
> > PYTHONPATH=/home/jlconlin/Library/Frameworks/Python.framework/Versions/
> > 2.7/lib/python2.7  DYLD_FRAMEWORK_PATH=/home/jlconlin/src/Python-2.7/
> > build: \
> >            ./python -Wi -tt /home/jlconlin/Library/Frameworks/Python.framework/
> > Versions/2.7/lib/python2.7/compileall.py \
> >            -d /home/jlconlin/Library/Frameworks/Python.framework/Versions/2.7/
> > lib/python2.7 -f \
> >            -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
> >            /home/jlconlin/Library/Frameworks/Python.framework/Versions/2.7/lib/
> > python2.7
> > Listing /home/jlconlin/Library/Frameworks/Python.framework/Versions/
> > 2.7/lib/python2.7 ...
> > Compiling /home/jlconlin/Library/Frameworks/Python.framework/Versions/
> > 2.7/lib/python2.7/._BaseHTTPServer.py ...
> > Sorry: TypeError: ('compile() expected string without null bytes',)
> > Compiling /home/jlconlin/Library/Frameworks/Python.framework/Versions/
> > 2.7/lib/python2.7/._Bastion.py ...
> > Sorry: TypeError: ('compile() expected string without null bytes',)
> > Compiling /home/jlconlin/Library/Frameworks/Python.framework/Versions/
> > 2.7/lib/python2.7/._CGIHTTPServer.py ...
> > Sorry: TypeError: ('compile() expected string without null bytes',)
>
> How did you obtain and unpack the source?  It looks like you used
> something that created the old-style "._" hidden forks when extracting
> the source.  

I downloaded the source from python.org and extracted with 'tar -xzvf
Python-2.7.tgz'  My home space is on some network somewhere.  I think
the network filesystem creates the ._ at the beginning of the files.
It's really quite annoying.


> The path names look a little suspicious, too:
> /home/jlconlin.  What file system type are these files on?  You
> shouldn't run into problems if you use an HFS+ file system (for
> instance) and extract the tarball from the command line using
> /usr/bin/tar.

I am intentionally installing in my home directory (i.e., /home/
jlconlin) because I don't have access to /usr/local.  Supposedly this
is possible, and in fact common.

>
> > PS. Python compiled correctly, but a few modules were not found/made
> > but I don't think they are important.
>
> > Python build finished, but the necessary bits to build these modules
> > were not found:
> > _bsddb             dl                 gdbm
> > imageop            linuxaudiodev      ossaudiodev
> > spwd               sunaudiodev
>
> Yes, all of those are to be expected on an OS X 64-bit build.

Is it safe to ignore these modules then?

Thanks,
Jeremy



More information about the Python-list mailing list