Mathics 0.6 Windows Installer Readme
This page describes a Windows installer for Mathics 0.6, a Computer Algebra System with Mathematica-like syntax. Although a web interface is available at http://www.mathics.net, there are advantages to having a local installation (e.g. files saved locally, can work without internet access). This Windows installer was built from Mathics 0.6 RC1, pulled from GitHub (see https://github.com/poeschko/mathics) on 21Dec2013
Install
Download the Windows self-installing executable:
-> Download Mathics 0.6 Windows Installer (PyPy 2.2.1 based) <-
and run it. Mathics 0.6 will be installed in the c:\mathics-0.6 directory and short cuts will be placed in a Mathics 0.6 group in the start menu.
If you get weird errors when you try to run the program, you may need the VC++ 2008 (x86) Redistributable Package.
It's normal to get a pop-up Windows Firewall message on the first run of the Mathics Server. Click "Unblock" to allow Mathics server to have access through the firewall so that the Mathics server will run properly on your local network.
Run
Select the "Run Mathics Server" then select the "Open Mathics Front End", both in the Mathics group in the Start Menu.
If no GUI is desired, the stand-alone Mathics console can be run via the "Run Mathics Console" Start Menu entry.
Uninstall
Uninstall using the typical Windows uninstall process (i.e. Start Menu|Control Panel|Programs and Features). If Mathics is uninstalled, the uninstaller deletes the c:\mathics-0.6 directory and removes the Mathics start menu entries.
Building the Distribution
This section contains a detailed description about how this Windows distribution of Mathics was built. If you just want to run the program, you can stop reading now.
PyPy Version
PyPy 2.2.1 was downloaded from http://pypy.org/download.html. The downloaded .zip file was extracted to c:\mathics-0.6\pypy
As a prerequisite of building Mathics, setuptools needs to be installed. I downloaded ez_setup.py and ran it via:
C:\mathics-0.6>pypy\pypy ez_setup.py
Then, the 21Dec2013 pull of Mathics was unzipped into C:\mathics-0.6, making the amendments to the stock release as noted above.
Two minor changes were made to the Mathics 0.6 distribution:
- A bug from Mathics 0.5 was intentionally re-introduced so that the database storing Mathics-related information is stored in the c:\mathics-0.6 tree, rather than in the user's APPDATA directory. This was done by changing line 53 of settings.py to DATA_DIR = '%APPDATA%/Python/Mathics/'
- The stock distribution crashed on my machine, apparently because not enough time was being allowed for Mathics to initialize. Changing timeout=30 to timeout=None on line 75 of core\definitions.py fixed this.
Mathics was built by typing:
C:\mathics-0.6>pypy\pypy setup.py install
The installation takes a while. It installs new, compatible versions of django and other dependencies.
After the installation is built, the database must be initialized. However, there was no copy of initialize.py available on GitHub at the time at which the distribution was pulled. The file in the Mathics 0.5 Distribution appeared to initialize the database adequately, by copying the file into C:\mathics-0.6 and typing:
C:\mathics-0.6>pypy\pypy initialize.py
The Mathics server can then be run via:
C:\mathics-0.6>pypy\bin\mathicsserver.exe
or the Mathics console can be run by:
C:\mathics-0.6>pypy\bin\mathics.exe
To assemble the distribution, the entire c:\mathics-0.6 directory was packaged up using Inno Setup. Inno Setup creates Start Menu entries that automatically call the server and console in the right ways, then unzips the distribution into c:\mathics-0.6. Install Mathics for Windows
CPython Version
An alternate build based on CPython rather than PyPy is available.
-> Download Mathics 0.6 Windows Installer (CPython 2.7.3 based) <-
If you get weird errors when you try to run the program, you may need the VC++ 2008 (x86) Redistributable Package.
The process is similar to that described for Mathics05 Mathics 0.5. However, instead of installing Python anew, the c:\Mathics-0.5 folder from the Mathics 0.5 installation was simply renamed c:\Mathics-0.6 The Mathics 0.5 installation was removed by deleting mathics-related files from c:\Mathics-0.6\Python27\Scriptsand c:\Mathics-0.6\Python27\Lib\site-packages. The existing django files were also removed from site-packages. Then, the Mathics 0.6 was unzipped into c:\mathics-0.6. To build all of the packages, cython needs Visual Studio 2008 or Visual C++ 2008 Express.
Two minor changes were made to the Mathics 0.6 distribution:
- A bug from Mathics 0.5 was intentionally re-introduced so that the database storing Mathics-related information is stored in the c:\mathics-0.6 tree, rather than in the user's APPDATA directory. This was done by changing line 53 of settings.py to DATA_DIR = '%APPDATA%/Python/Mathics/'
- The stock distribution crashed on my machine, apparently because not enough time was being allowed for Mathics to initialize. Changing timeout=30 to timeout=None on line 75 of core\definitions.py fixed this.
Mathics was built by typing:
C:\mathics-0.6>Python27\python setup.py install
The installation takes a while. It installs new, compatible versions of django and other dependencies.
After the installation is built, the database must be initialized. However, there was no copy of initialize.py available on GitHub at the time at which the distribution was pulled. The file in the Mathics 0.5 Distribution appeared to initialize the database adequately, by copying the file into C:\mathics-0.6 and typing:
C:\mathics-0.6>Python27\python initialize.py
Last, some temporary files can be cleaned up via:
C:\mathics-0.6>Python27\python setup.py clean
The Mathics server can then be run via:
C:\mathics-0.6>Python27\Scripts\mathicsserver.exe
or the Mathics console can be run by:
C:\mathics-0.6>Python27\Scripts\mathics.exe
To assemble the distribution, python27.dll was first copied from c:\Windows\system32 to the c:\mathics-0.6 directory. Then, the entire c:\mathics-0.6 directory was packaged up using Inno Setup. Inno Setup creates Start Menu entries that automatically call the server and console in the right ways, then unzips the distribution into c:\mathics-0.6. Install Mathics for Windows