Tuesday, April 21, 2009

Python 64 bit!

I got python 64 bit to compile, but it required a number of tricky steps.

First, this guy has the instructions I followed:
captnswing

However, it didn't work entirely as advertised. I ran the configure as advertised:

./configure --enable-framework=/Library/Frameworks \
--enable-universalsdk=/ \
MACOSX_DEPLOYMENT_TARGET=10.5 \
--with-universal-archs=all \
--with-readline-dir=/usr/local


then the make install, but /usr/local/bin/python pointed to the wrong place, so I replaced the symbolic link in my python path with the correct one:

sudo rm /Library/Frameworks/Python.framework/Versions/2.6/bin/python
sudo ln -s /Library/Frameworks/Python.framework/Versions/2.6/bin/python-64 /Library/Frameworks/Python.framework/Versions/2.6/bin/python


Now python is 64 bit:

eta ~$ python -c "import sys; print sys.maxint"
9223372036854775807


I haven't checked whether it works yet though...

Update: Had to reinstall with gnu readline installed. Also have to install PyQt4 and might have to recompile numpy...

numpy won't compile with python 2.6.2:
C compiler: gcc -arch i386 -arch ppc -arch ppc64 -arch x86_64 -isysroot / -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes

compile options: '-Inumpy/core/include -Ibuild/src.macosx-10.5-universal-2.6/numpy/core/include/numpy -Inumpy/core/src -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c'
gcc: build/src.macosx-10.5-universal-2.6/numpy/core/src/_sortmodule.c
In file included from numpy/core/include/numpy/ndarrayobject.h:26,
from numpy/core/include/numpy/noprefix.h:7,
from numpy/core/src/_sortmodule.c.src:29:
numpy/core/include/numpy/npy_endian.h:33:10: error: #error Unknown CPU: can not set endianness
lipo: can't figure out the architecture type of: /var/folders/ni/ni+DtdqFGMeSMH13AvkNkU+++TI/-Tmp-//cceaWIvZ.out
In file included from numpy/core/include/numpy/ndarrayobject.h:26,
from numpy/core/include/numpy/noprefix.h:7,
from numpy/core/src/_sortmodule.c.src:29:
numpy/core/include/numpy/npy_endian.h:33:10: error: #error Unknown CPU: can not set endianness
lipo: can't figure out the architecture type of: /var/folders/ni/ni+DtdqFGMeSMH13AvkNkU+++TI/-Tmp-//cceaWIvZ.out
error: Command "gcc -arch i386 -arch ppc -arch ppc64 -arch x86_64 -isysroot / -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Inumpy/core/include -Ibuild/src.macosx-10.5-universal-2.6/numpy/core/include/numpy -Inumpy/core/src -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c build/src.macosx-10.5-universal-2.6/numpy/core/src/_sortmodule.c -o build/temp.macosx-10.5-universal-2.6/build/src.macosx-10.5-universal-2.6/numpy/core/src/_sortmodule.o" failed with exit status 1


That sucks.

Monday, April 20, 2009

Hosting on my mac

I'm hosting my website off my mac; it should be accessible to the outside world now: eta.colorado.edu.

A few things went into this....

  1. Don't install the fink version. The two versions clash and depending on how you access your computer you could end up looking at entirely different directories (e.g. localhost and eta.colorado.edu referred to different sites for a while)
  2. The configuration file is /private/etc/apache2/httpd.conf
  3. I needed to change DirectoryIndex to index.htm (from index.html)
  4. uncommmented "LoadModule php5_module libexec/apache2/libphp5.so"
  5. had to allow override so that .htaccess files would work.

Wednesday, April 15, 2009

Mac stuff cont'd

Trying to get Apache server to run, and it's just a pain.

I frequently forget how to update the locate database because it's different on macs. Marcos' Mac Singularity has the instructions .

In short:
sudo /usr/libexec/locate.updatedb

Tuesday, April 14, 2009

Google has failed me

So, either no one on the internet has successfully installed 64-bit python on a mac (which I find nothing short of impossible) or google has totally failed. None of the hits for any combination of 64 bit, python, mac, etc. has shown a useful result. Wow.

Monday, April 6, 2009

Caffeine

Caffeine consumption stopped around mid-October. I think it was when I got back from observing so October 20 give or take. Re-started consumption mid-March. Date is hard to say... I think it was Sunday before Spring Break, but hard to say because I still took it easy until ~last week.

Conclusions? I'm probably more tired in the mornings with caffeine than without. Also, probably perform better @ ulty when I'm not addicted. However.... not really conclusive. Just addictive.

Saturday, April 4, 2009

weekend

What did I do this weekend?
-upgraded PyRAF from 1.6.1 to 1.7
-switched matplotlib backends from TkAgg to Qt4
-put up a new article on molecularclouds


So... totally unproductive, but only in an awesome way?

I tried to switch PyRAF from X11 to Aqua a la Ticket 86 on the PyRAF trac site, but it failed with a can't-load error.

Also, updated readcol documentation so that it makes sense. Sam has used it, Robbie might.

Wednesday, April 1, 2009

April 1st, 2009

No April fools' day would be complete without scientists' contributions:

http://arxiv.org/abs/0903.5308
http://arxiv.org/abs/0903.5321
http://arxiv.org/abs/0903.5377

although it's not obvious whether .5308 is actually intended to be humorous