Friday, July 16, 2010

SciPy 2010 Review

SciPy 2010 Review

Download the video from enthought.com

Thursday, July 1, 2010

Travis Oliphant announces...

(reposted from the Enthought blog)
Travis announces project to extend NumPy/SciPy to .Net(photo: Paul Ivanov)
Travis Oliphant, President of Enthought, Inc., kicked off today's SciPy 2010 Day 2 with a great keynote talk. He told the story of his own path to Python, filling his slides with the faces and work of other developers, scientists, and mathematicians — inspiration, teachers, and collaborators. He explained how his academic trajectory, from electrical engineering, through a brief affair with neuroscience, to a biomedical engineering PhD, both drove and competed with his work creating NumPy.
Last, but not least, Travis closed his talk with rather large announcement: Enthought has undertaken the extension of NumPy and SciPy to the .NET framework. For details on the project refer to the official release.

SciPy 2010 underway!

(reposted from the Enthought blog)
We were thrilled to host SciPy 2010 in Austin this year. Everyone seems to be enjoying the cool weather (so what if it’s borne of thunderstorms?) and the plush conference center/hotel (even if we had to retrain their A/V team).
After two days of immensely informative Tutorials, the General Session began yesterday with speaker Dave Beazley's awesome keynote on Python concurrency. In addition to the solid line-up of talks at the main conference, we had two very well-attended specialized tracks: Glen Otero, chaired the Bioinformatics track, while Brian Granger and Ken Elkabany coordinated the Parallel Processing & Cloud Computing talks. The day then closed with a conference reception and guacamole-fueled Birds of a Feather sessions.
SciPy 2010

SciPy 2010 Group Photo

DSC_9860

It took a couple attempts to find a good location for such a large group photo -- but fortunately the conference is only a block or two from the entrance to the beautiful University of Texas Austin campus! Thankyou to everyone for being patient while we moved from spot to spot. You can download large (1024 x 680) and original (4256 x 2828) files on the photo page.

Tuesday, June 29, 2010

SciPy 2010: Basic Tutorials -- IPython and virtualenv

The basic tutorials at SciPy were well-taught and allowed someone unfamiliar with numpy, scipy, and ipython (like me!) to get up to speed and productive very quickly. I now feel confident with the new tools in my python toolbox. Thanks!

I use virtualenv extensively to control my python site-packages environment. This allows me to experiment with different versions of the python packages I use, including repository sources, without polluting or corrupting my system's overall python environment. It's a great tool and easy to use, at least in the Red Hat and Debian-based Linux systems I use daily.

However, one thing I discovered was that ipython unfortunately did not work properly in my virtualenv'ed python environments. Regardless if I had activated a virtualenv environment, ipython always used the system site packages only.

In order for virtualenv to do it's magic in creating a virtual python environment, it relocates python (so that the python path, etc. are set correctly). For example, if there is a virtualenv in the directory "~/dev/pyenv", "which python" will return "~/dev/pyenv/bin/python" if that virtualenv is active.

The problem is that the shebang in the ipython script (/usr/bin/ipython on my system) points to the system python, not the virtualenv one. So whenever ipython is executed, it will use the system python, not the virtualenv one.

There are a number of ways to address this. One could "easy_install ipython" in every virtualenv where ipython is desired. This seems excessive, and redundant in virtualenv's where the system site packages are included. Note, you'll still need to "pip install ipython" in virtualenv's without the system site packages included (--no-site-packages option) as that creates a clean and empty python environment with nothing previously installed.

One could instead edit the ipython script to shebang "python", removing the absolute path. Then, when ipython is executed, it will use whatever python command is in the path. But if ipython is upgraded, that edit could be lost. It also directly changes a system package, which is generally not preferred.

Therefore, the best solution is to is just bypass the shebang by running "python /usr/bin/ipython" rather than just "ipython". This way, the shebang will be ignored, and the path's python will get run. This will be the system python if not in a virtualenv environment, or the virtualenv's python if active. However, remembering to type "python /usr/bin/ipython" instead of "ipython" is a pain. An alias in .bash_aliases like "alias ipython='python /usr/bin/ipython'" is the answer here.

Hopefully this helps others who want to use ipython in their virtualenv environments. I am looking forward to using these new tools and hear all the cool things people are using python for at the conference proper tomorrow and Thursday.

With this, ipython will work perfectly in both system and virtualenv environments.

SciPy 2010: Tutorials Day 2 - Mayavi

Prabhu Ramachandran is delivering an overview of Mayavi 2 and some of the finer points of mlab in particular. The first exercise was a quick Lorenz attractor visualization (which I got mostly right on the first try). mlab.quiver3d provides a nice one-liner to pop up a view of the data. Here's a video of the result (with a little tweaking of parameters through the nice UI that comes up).

SciPy 2010: Tutorials Day 2 - Traits/TraitsUI

Corran Webster of Enthought presented a session on Traits in the afternoon. In particular, he covered TraitsUI with some detail. Good hands-on exercises resulted in a nice GUI for manipulating data in just a few minutes. It's good to see how this library is incrementally improving.