Howto install Spyder 1.x on Mac OS X with 64bit Python

28/Aug/2010

As I searched my way through the Eric4 installation process, I thought, if I could Spyder 1.x get working on Mac OS X 10.6.
Spyder is another Python IDE with advanced editing, interactive testing, debugging and introspection features. Usecases include e.g. scientific computing thanks to NumPy (linear algebra), SciPy (signal and image processing), matplotlib (interactive 2D/3D plotting) and MayaVi’s mlab (interactive 3D visualization) support.

Since its build with PyQt and QScintilla, the install procedure is very similar to the one with Eric4.

mehr … »


Howto install Eric4 on Mac OS X with 64bit Python

28/Aug/2010

When Mac OS X 10.6 (Snow Leopard) was released, 64bit Python became the default on OS X, and the question arised, how to deal with it in regard to Eric4. My old HowTo was very well received, but it covers mostly 32bit installation and therefor caused some troubles.

So instead of steadily updating it, I decided to re-publish it with my current stand of knowledge together with some corrections.

Eric4 on Mac OS X 10.6 Snow Leopard

mehr … »


SSH your (Arch) Linux VM in VMWare Fusion

2/Aug/2010
So you have (Arch) Linux running in VMWare Fusion and want to access it via SSH from Mac OS X.
The default setting in Fusion is ‘Bridged’ network connection, where it connects your vm directly to the network just as another computer with an IP adress normally given by the router, so that you just need to find out that IP by ‘ifconfig’ in Linux and then just ‘ssh username@ip-adress’ in OS X.
If you are always at the same network, you eventually can set your Linux to a static IP adress, e.g. in rc.conf in Arch Linux, so you can save the first step.
But what, if you’re working mobile, beeing in other networks or even beeing offline sometimes … how to ‘ssh’ into your Linux VM?
You will end up using ‘NAT’ in Fusion.
There is a nice blog entry (http://nileshk.com/vmware-fusion-nat-dhcp-and-port-forwarding) describing how to assign fixed IP adresses to your VM using this setup, including Port forwarding and handles, so that you don’t even have to remember the IP adresses anymore.
However, even if I’m doing as explained, there’s a little difference for me in VMWare Fusion 3.1.0:
With this entry in /Library/Application Support/VMware Fusion/vmnet8/dhcpd.conf:
host arch64 {
hardware ethernet 00:0C:29:79:7E:CE;
fixed-address 192.168.214.100;
}
and
[incomingtcp]
# Forward host port 2222 to SSH on Arch64 VM
2222 = 192.168.214.100:22
in my /Library/Application Support/VMware Fusion/vmnet8/nat.conf
and setting my Linux VM’s IP internally to 192.168.214.100 via Archs /etc/rc.conf:
HOSTNAME=”arch64″
#Static IP
eth0=”eth0 192.168.214.100 netmask 255.255.255.0 broadcast 192.168.214.255″
#eth0=”dhcp”
INTERFACES=(eth0)
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   – prefix an entry in ROUTES with a ! to disable it
#
gateway=”default gw 192.168.214.2″
ROUTES=(gateway)
the IP adress of the VM, OS X sees, is nevertheless 127.0.0.1, so that I had to put:
#VMWare
127.0.0.1               arch64
into my Macs /etc/hosts file.
Now you should be able to only e.g. ‘ssh arch64′ (considering your VM’s name is ‘arch64′).
That for now. After lasts posts tip to tweak VMWare Fusion to only start background processes if needed (http://forums.macrumors.com/showthread.php?t=960043), and our setup for easy SSH access we are nearing a state, where our Linux VM becomes a viable development environment for Python and web development tasks.

So you have (Arch) Linux running in VMWare Fusion and want to access it via SSH from Mac OS X.

The default setting in Fusion is ‘Bridged‘ network connection, where it connects your vm directly to the network just as another computer with an IP adress normally given by the router, so that you just need to find out that IP by ‘ifconfig‘ in Linux and then just ‘ssh username@ip-address‘ in OS X.

If you are always at the same network, you eventually can set your Linux to a static IP adress, e.g. in rc.conf in Arch Linux, so you can save the first step.

But what, if you’re working mobile, beeing in other networks or even beeing offline sometimes … how to ‘ssh’ into your Linux VM?

You will end up using ‘NAT‘ in Fusion.

mehr … »


Simple FTP tasks under Mac OS X

2/Aug/2010

Did you know, that for simple FTP tasks you don’t necessarily need an additional FTP-app on Mac OS X?

Just press Cmd+k in Finder or via menue ‘Go to’–>’Connect with server …’ and you will be promted with an URL-field. Just type e.g. ‘ftp://works13.com’, insert username and password in the next step, and your FTP Server is mounted in Finder, where you can use it like any other folder on your machine.


The best way of running (Arch) Linux on a Mac?

2/Aug/2010
Whats the best way, to bring my beloved Arch Linux on my Mac?
Since I bought one some years ago, I tried several ways of running Linux or Linux apps on it and every time I faced some challenges, discovered pros and cons that I want to highlight here, to give you, my dear reader :), a little overview and help, when the question arises, which one to take and which tools to choose.
By the way, all was tested on a 15″ Macbook Pro 5,3 (Late 2009)
1. Native install
Maybe the most evident approach is, to just install it beside your Mac OS X, and eventually MS Windows as a double or triple boot setup (or radically let it be the one and only OS on your Macbook).
Installation will be easy and the Arch Wiki (http://wiki.archlinux.org/index.php/MacBook) guides you along the whole procedure and at the end Arch runs as intended. I come to that later.
The advantage of this way is, your OS will have full access to your hardware, including: running at native speep, all the nice OpenGL and Compiz bling and no interference with your keyboards function buttons.
So, where’s the catch? By the way, I don’t count the need, to every time reboot and hit the options key to boot into Arch, as challenge ;).
No, the catch is, that with a tradional install you will install grub into a fake MBR and don’t use the modern EFI. This causes Linux to only see and use the higher end graphics card, which further sucks and drains your battery very quickly, heating up your MBP too to a huge extent.
To prevent this, you have to boot via EFI, whereby grub2 already provides this possibility. However, I never got this working, even by investing a huge amount of time. Maybe time will provide a viable solution.
2. Virtualisation
Another way is to run Linux in a Virtual Machine (VM). The benefits are, you don’t have to reboot every time switching from Mac OS X to Linux, you can run Linux and Mac apps side by side (unity mode), and maintaining your Arch Linux install is even easier, since you don’t have to really care about the hardware support, powermanagement and the like. In the best case, exchange and access between host and guest OS is easy and seemless.
I have tested Arch with the 3 most popular virtualisation apps on Mac: VMWare Fusion, Parallels Desktop and Virtualbox. There are some other like “Q” (http://www.kju-app.org/), feel free to try them out.
The catch here is, Arch Linux is not such a popular and commercially wide supported distribution as, say, Ubuntu or OpenSuse. For such flavors of Linux you will therefor often find excellent support in form of guest additions and auto-install.
Arch Linux on the other side depends on community support, like guides and wikis.
2.1. Parallels Desktop
First of, Parallels is fine for running Windows or Ubuntu (I don’t remember if it allready supports OpenGL/Compiz under Linux), both run out of the box and installation of guest additions is a snap. An advantage over VMWare Fusion is, that it’s not such a ressource hog like the former one and slows down boot and shutdown time by starting a whole bunch of background processes when booting OS X.
Whats up with Arch? Since Arch uses a more BSD style init system and is not directly supported, installation of the guest additions fails at first. There is a lot of try and error to get them to install ‘somehow’ and what thereby lacks most, is online ressources. Neither the Arch Forum, nor the wiki, nor Google can provide you with some really helpfull, so that this is the weakest point of Parallels.
I always got the feeling of a hacky and unsatisfiing solution.
2.2. Oracle Virtualbox
The one which got my most symphaties just because it’s free and open source.
The huge advantage over the Parallels solution is the comprehensive amount of information you find if your are in need of help in the wiki (http://wiki.archlinux.org/index.php/VirtualBox), forum and on the web.
This time Arch Linux is supported by VirtualBox and you will have no trouble installing the guest additions. It even lets you enable Desktop effects.
And, same as Parallels, it doesn’t slow down your computers boot time. Additionally, Virtualbox spits out often new minor-releases that fix bugs and improve the software at a steady rate.
With so much light there is also a lot of darkness.
The truth is, even if VB is evolving fast, it is well behind Parallels and VMWare.
To mention some drawbacks: I never got USB properly to working (even with the PUEL version). This is a problem which is known for a long time, but until now never got properly solved by the VB devs. It feels unfinished and unstable: I often had to reboot my virtual machine several times until it starts without X11 crashing or staying completely black, thereby having to take care of having my mousecursor “within” the VM above the visible area, just to prevent such things … something I never experienced in other VM software.
Looking at my iStat I found that VB higher than the average uses CPU cycles and in comparisson to the other both were not very efficent in regard of system ressources.
In ‘unity mode’ you have an ugly visible frame around your OS X desktop. And it also higher than the average chrashed for me … one time even damaging my virtiual harddrive so that I couldn’t boot Arch anymore.
2.3. VMWare Fusion
First of, from these three apps VMWare feels the most stable and mature to me.
It has a extremely little footprint: it barely uses CPU itself, just a KDE desktop with Arch is nearly under 1% CPU time.
There is a good amount of online ressources where you can find help. Guest addition installation is simple. Sure you can go with the guide http://wiki.archlinux.org/index.php/Installing_Arch_Linux_in_VMware , but you also can just use pacman to install the ‘open-vm-tools’ from the Arch repositories for you. I did not find any differences in features between the ones provided within VMWare itself and its open-source-pedant.
All in all, everything works like expected.
Ok, not all. Unlike in VirtualBox there is no OpenGL support for Linux, so no fancy desktop effects and no compositing. Their forums say, its in consideration for a later version, so you can just wait.
What is/was a huge drawback is, that VMWare starts a lot of background processes at boottime and therefore slows time the start of Mac OS X. I don’t use VMWare every day, so I don’t even need these processes running in the background. But fortunatelly there are others that also don’t like this behavior, e.g. a user in the macrumor forums, which posted a guide with some scripts to only start these processes when VMWare is started: http://forums.macrumors.com/showthread.php?t=960043 .
So my biggest challenge is solved with this finding and in the end I’ll stick with VMWare. The missing OpenGL support is a bad thing, but I think I can live with it, taking in consideration that stability and the good Arch Linux support (even if community-wise) outweights this little disadvantage. At least I have a better and a more carefree experience than with Parallels and VirtualBox.
By the way, if you are a student, you can get it for half the price, e.g. in Apples Online store.
3. Packetmanagementsystems
If you just want single Linux software you can also can use a packetmanagementsystem for Mac like MacPorts (http://www.macports.org/), Fink (http://www.finkproject.org/) or Homebrew (http://mxcl.github.com/homebrew/).
It downloads, compiles and installs the software for you, taking care of all of it dependencies.
I only tried MacPorts once to install Eric4 and KDE on my Mac, but even if it installs in a prefixed directory, I always have mixd feelings, that it could taint or interfer with the default installation. Already having two independet python versions (the system one, and the one from macports) is a strange thing.
It also takes a while to compile the software.
I haven’t dived in enough to provide informations if there are also binary packages available.
It surely has it advantages if you need special software on your Mac but don’t want to compile and frickle with every dependency yourself, but at this time I rather stay away and use packet manager within Linux in a virtual machine. :)

Whats the best way, to bring my beloved Arch Linux on my Mac?

Since I bought one some years ago, I tried several ways of running Linux or Linux apps on it and every time I faced some challenges, discovered pros and cons that I want to highlight here, to give you, my dear reader :), a little overview and help, when the question arises, which one to take and which tools to choose. mehr … »