installing wine on ubuntu 14.04 after upgrade from ubuntu 12.04

I had the issue a few others had where trying to install WINE on an Ubuntu 14.04 x64 system that had previously been upgraded from Ubuntu x64 wouldn’t work with a message about liblcms2-2 conflicting with liblcms2-2:i386. Even the Wine PPA wouldn’t help.

Then I ran across a fix where you type
sudo apt-get install liblcms2-2=2.5-0ubuntu4
and then you can install wine!

Writing multipage TIFF with Python

You can use the freeimage plugin to SciPy as one method. On Windows you might see the error:
RuntimeError: Could not find a FreeImage library

To fix this, download the FreeImge DLL from

Then extract the file

to the following directory (assuming you’re using Anaconda Python)

Example code (assuming you have image stored in C-ordered 3-D array images):

from import freeimage_plugin as freeimg



Python using NaN or None as sentinel

Sometimes I was forced to use NaN as a sentinel value, for example with the current version of Numba that can’t handle “is not None”.

The summary is that comparing to None instead of NaN is over 100 times faster. This negates the advantage of Numba when you have to compare to sentinel values!

Here’s a test with Python 3.4:

$ ipython3
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
IPython 2.3.0 -- An enhanced Interactive Python.
from numpy import isnan
%timeit ~isnan(0)
100000 loops, best of 3: 3.75 µs per loop
%timeit 0 is not None
10000000 loops, best of 3: 35.6 ns per loop

And Python 2.7

Python 2.7.6 (default, Mar 22 2014, 22:59:56)
IPython 2.3.0 -- An enhanced Interactive Python.
%timeit ~isnan(0)
100000 loops, best of 3: 3.73 µs per loop
%timeit 0 is not None
10000000 loops, best of 3: 41.5 ns per loop

Matplotlib: 3-D mesh wiregrid example

Some of the Matplotlib 3-D examples out there are a little out of date. Here is a minimal working example for the current version of Matplotlib 1.4

#!/usr/bin/env python
from mpl_toolkits.mplot3d import Axes3D # this line must come before the next line!
from matplotlib.pyplot import figure,show
from numpy import linspace,meshgrid,pi,sin #for testing
key point: the line "from mpl_toolkits.mplot3d import Axes3D" needs to come before
the "from matplotlib.pyplot import ...." line in the FIRST file you run.
To be sure, I make the "from mpl_toolkits.mplot3d ..." line come first in my
main function file (the one I invoke from the command line or Spyder)

def test():
    x,y = meshgrid(linspace(0,2*pi),linspace(0,2*pi))

    z = sin(x+0.5*y)
    ax = figure().gca(projection='3d')

if __name__ == '__main__':
    test() Windows client under Wine / Linux

So far, the webcam doesn’t work, but the send/receive audio does work on a test call. I didn’t test receiving video.

NOTE: in an actual conference, I wasn’t able to get sound, and so had to use a telephone. I have also seen problems with this for people using Windows and Mac at a large conference–leading the remote speaker to call in.

I personally avoid using GoToMeeting and would recommend using Google Hangouts or Skype instead of GoToMeeting for desktop sharing, video and audio between Mac/Linux/Windows/Android/iOS.

I tested this on Ubuntu 14.04 with wine 1.7.18. Again, this ultimately failed in a real conference. I don’t recommend GoToMeeting at this time for Linux or any operating system where you have a lot of people counting on it actually working..

1) Get the latest MSI file for GoToMeeting — I used V6.2.1 build 1350 from

2) in Terminal, type
wine msiexec /i ~/Downloads/G2MSetup6.2.1350_IT.msi
3) You may not have sound by default. To fix this, start GoToMeeting, right-click the flower toolbar icon, select Preferences, Audio, and select the Pulseaudio device for each.
Uncheck the “Automatically adjust my system mixer settings” and “Use automatic volume and noise processing” boxes.

Quote of the Day

Some think the Earth is spherical, others that it is flat and drum-shaped.
For evidence they bring the fact that, as the sun rises and sets, the part concealed by the Earth shows a straight and not a curved edge, whereas if the Earth were spherical the line of section would have to be circular . . .
. . . but in eclipses of the moon the outline is always curved: and, since it is the interposition of the Earth that makes the eclipse, the form of this line will be caused by the form of the Earth’s surface, which is therefore spherical.
Aristotle. “On the Heavens”. Written 350 B.C.E.

Quoted in:
Kabanikhin, Sergey I. Inverse and Ill-Posed problems

Winetricks “voice had cried out in terror” error resolve

if you get a winetricks error like:
wine cmd.exe /c echo '%ProgramFiles%' returned a string containing the word 'unknown', as if a voice had cried out in terror, and was suddenly silenced.

You can fix it by doing the following
1) backup your existing system.reg file by typing in Terminal:
cp ~/.wine/system.reg ~/.wine/system.reg.bak
2) gedit and replace all
C:\\Program Files