Mathchem Get started

Python installation

Mathchem works with Python 2. First, we will need Python installed.

Windows

  1. Download win 32 bit installer here: https://www.python.org/ftp/python/2.7.6/python-2.7.6.msi
  2. Run and install as usual program. We will asume that you installed Python to default directory C:\python27
  3. Install pip the tool for installing and managing Python packages.
    1. Download this script to your Python directory: get-pip.py
    2. In command line (press Win+R and type cmd) run:
      c:
      cd c:\python27
      python get-pip.py

OS X and Linux

Python is already installed on your computer

Install pip the tool for installing and managing Python packages.
  1. Download this script to your home directory: get-pip.py
  2. In terminal run:
    cd ~
    python get-pip.py

Alternatively, pip can be installed with MacPorts.

sudo port install py27-pip

Installing Mathchem as Python package

Mathchem can be installed as a normal Python module or(and) as a Sage module.

The package requires that numpy was installed before.

Windows

Before installing Mathchem, let us install numpy and scipy

  1. Install numpy: Download and run windows installer: numpy-1.8.1-win32-superpack-python2.7.exe
  2. Install scipy: Download and run windows installer: scipy-0.14.0rc1-win32-superpack-python2.7.exe

Run in command line:

python -m pip install mathchem

OS X and Linux

If we use pip tool, then numpy will be installed automatically.

pip install mathchem

To manually install numpy run in the terminal:

pip install numpy

To manually install scipy run in the terminal:

pip install scipy

Or visit official scipy web-page: http://scipy.org/install.html

Another option to install numpy and scipy is using MacPorts.

sudo port install py27-numpy py27-scipy

This command will install the full scipy stack but takes more time

sudo port install py27-numpy py27-scipy py27-matplotlib py27-ipython +notebook py27-pandas py27-sympy py27-nose

Sage installation

Check the Sage downloads page: http://sage.igor.onlinedirect.bg/index.html

Windows

Unfortunately Sage work only under Unix-like system. It can be run on Windows using virtual machine. To install Virtual Box on Windows follow this link: http://download.virtualbox.org/virtualbox/4.3.10/VirtualBox-4.3.10-93012-Win.exe

See additional instructions: http://wiki.sagemath.org/SageAppliance steps 1-4.

OS X

Download to your home directory sage-6.1.1-x86_64-Darwin-OSX_10.9_x86_64.dmg

Mathchem as Sage package

  1. Download Mathchem spkg file: http://mathchem.iam.upr.si/#downloads
  2. Run in terminal:
    sage -f mathchem-1.1.3.spkg
    Note for VirualBox: to show terminal window press right Ctrl + F1. To switch back to notebook press right Ctrl + F2.