Compilation on Linux

The following are the commands used to setup python3 and pypy3 on our school infrastructure:

# build dependencies
apt-get install -y pypy gcc make libffi-dev pkg-config libz-dev libbz2-dev libsqlite3-dev libncurses-dev libexpat1-dev libssl-dev libgdbm-dev tk-dev libgc-dev python-cffi liblzma-dev
# building python3.6
wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
tar -xf Python-3.6.2.tgz -C /opt/ && rm Python-3.6.2.tgz
cd /opt/Python-3.6.2
./configure --enable-optimizations
make -j8
sudo make altinstall
python3.6 --version
# building pypy3.5
wget https://bitbucket.org/pypy/pypy/downloads/pypy3-v5.8.0-src.tar.bz2
tar -xf pypy3-v5.8.0-src.tar.bz2 -C /opt/ && rm pypy3-v5.8.0-src.tar.bz2
cd /opt/pypy3-v5.8.0-src/pypy/goal/
pypy ../../rpython/bin/rpython --opt=jit
ln -s $(pwd)/pypy3-c /usr/local/bin/pypy3
# python packages - append "--user" if you do not want them globally
python3 -m pip install --upgrade pylint coverage sphinx cython
 Previous