![]() | ||||
| Announcements | Information & Policies | Calendar | ||
|---|---|---|---|---|
| Software | Online Tutor | Reference Material | ||
The latest version of Ubuntu, 9.04, installs python 2.6 as the default. However, our code for 6.01 (in addition to code from many other packages) was built for python 2.5. As a result, when you try to run much of our code (e.g. SoAR), you'll get errors. Fortunately, it's relatively straightforward to set python 2.5 to be the default on your new Ubuntu installation. Just execute the following commands:
sudo apt-get install python2.5 idle-python2.5 sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.6 1 sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.5 10 sudo update-alternatives --config python
This last command will allow you to choose which version of python to use by default. If you have done everything above correctly, python2.5 should already be set as the default. If it is not, choose it to be the default. From now on, running python should start version 2.5.
In some cases (e.g., installing or updating certain packages), you'll get an error message if you've run the commands above. To update these packages, you'll have to temporarily undo these changes. Here's how to do that:
sudo update-alternatives --remove-all python sudo ln -s python2.6 /usr/bin/python
Once you're done updating these packages, execute the commands at the top to set python2.5 as the default again.