Python 2.7.2 stackless.
PS: My Environment Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-30-generic x86_64).
Firstly, update the source before installing what is needed. There may be errors during installation, so try again a few times.
apt-get update
apt-get install libreadline-dev
apt-get build-dep python2.7
Go to the tmp directory to download stackless and unzip it (you can try other 27x to 278 on your own):
cd /tmp
wget http://www.stackless.com/binaries/stackless-272-export.tar.bz2
bunzip2 stackless-272-export.tar.bz2
tar xf stackless-272-export.tar
Compilation and installation.
./configure --prefix=/opt/stackless --enable-unicode=ucs4
make
make install
PS: The following error can be ignored. When making, it is not a make install;
Python build finished, but the necessary bits to build these modules were not found:
_bsddb bsddb185 dl
imageop linuxaudiodev ossaudiodev
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
_curses _curses_panel
Create links and modify files:
sudo ln -s /usr/lib/python2.7/dist-packages/ /opt/stackless/lib/python2.7/site-packages
sudo ln -s /usr/local/lib/python2.7/dist-packages/ /opt/stackless/lib/python2.7/dist-packages
sudo ln -s /opt/stackless/bin/python /usr/bin/stackless
sudo vi /opt/stackless/lib/python2.7/site.py
After entering vi and reaching around 300 lines, you will see similar code, which will be modified as follows:
elif os.sep == '/':
sitepackages.append(os.path.join(prefix, "lib",
"python" + sys.version[:3],
"site-packages"))
sitepackages.append(os.path.join(prefix, "lib",
"python" + sys.version[:3],
"dist-packages"))
sitepackages.append(os.path.join(prefix, "lib", "site-python"))
In the end, it was successful.