Installing Mayavi2 in Kubuntu/Ubuntu 8.04

Open the package manager, such as Adept or Synaptic. Add the following lines to the repository:

deb http://ppa.launchpad.net/gael-varoquaux/ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/gael-varoquaux/ppa/ubuntu hardy main

And reload the packages, search for “mayavi2”, and install. I encountered some problem (I forgot to take note the error message), it shows some import cannot be found. After I googled, it turns out that the cause of error is the old “enthought” eggs which I have installed previously, the forum suggested that I deleted these old files:
cd /usr/local/lib/python2.5/site-packages/
sudo rm -rf enthought.*

but after that I decided to try installation using “easy_install”, to see how easy it is. But the installation got error and said Sphinx cannot be found, so I installed sphinx first:

sudo apt-get install python-sphinx

And then tried the easy install by typing:

sudo easy_install "Mayavi[app]"

But even, after it successfully install, I got this error

Traceback (most recent call last):
File "/usr/local/bin/mayavi2", line 5, in
from pkg_resources import load_entry_point
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2561, in
working_set.require(__requires__)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 524, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: enthought.mayavi==2.0.1a1

After I typed “which mayavi2” it turns out that it ran from /usr/local/bin with the old mayavi packages I tried to install, the new installation script done by easy_install is at /usr/bin/, so simply need to use the full path or copy to /usr/local/bin the new script. That ends my journey in installing mayavi2. đŸ™‚

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: