MIRISim software distribution
This page describes how to install the MIRI Simulator and its dependencies, all packaged into an Anaconda environment "MIRISim MIRICLE". MIRISim MIRICLE
is based on the Anaconda python distribution
For more information on the MIRI Simulator, what it is, how to use it, etc, please visit the MIRISim page
You need to install a few packages before you can install MIRISim MIRICLE
- Anaconda: the installation of the Anaconda Python distribution is described in the next section.
- wget or curl
- For Mac users: you need to install XQuartz (http://www.xquartz.org/).
- MIRICLE is tested both on Mac and on Linux (Debian squeeze, Fedora 23/24/25 and Ubuntu 14.04), using Anaconda 4.3.4. MIRICLE does not work on Windows.
- You will need at least 2 GB of disk space to store Anaconda, and another 2.5 GB of disk space to store each mirisim environment.
: Installing and downloading the software can take a few minutes, even on a fast internet connection!
Installation is straightforward.
- Before installing MIRICLE, you need to install Anaconda. Make sure to install the Python 3 version of anaconda, and DO NOT use root to install Anaconda. You need at least version 4.3.4 of Anaconda to be able to run MIRICLE. Installation instructions can be found here: http://docs.continuum.io/anaconda/install
- Using Anaconda makes sure that the python distribution for MIRICLE does not interfere with the python version which is already (pre-)installed on your computer. Anaconda also makes sure that you can different versions of MIRICLE which do not interfere with each other.
- NOTE: The Anaconda installation will edit your .bashrc or .bash_profile file. A backup will be written to a .bash...-anaconda.bak. Check that your startup file has been edited correctly!
- IN CASE OF PROBLEMS: Make sure that your .bash_profile, .profile or .bashrc does not set another python version in the PATH. If this is the case, it is possible that your computer is confused which version of python to take. A good rule in case of problems is to empty your .bash_profile, .profile or .bashrc and make sure that only the anaconda based entries are kept.
- Anaconda loves bash, so if you are running another shell like tcsh, anaconda will create a .bash_profile and in order to install or run MIRICLE you always first have to start the bash shell by typing bash
- Make sure to use the python installed by anaconda by running:
conda activate root
is a bash script located in anaconda/bin/. If activate
is not known by the system, make sure to add the anaconda path to your PATH.
- Download the installation script : mirisim_install.bash
- If you don't want MIRISim data to be installed in your home directory, define the MIRISIM_ROOT environment variable to point to a directory where there is sufficient disk space.
- Execute the installation script. This will install the latest stable version of MIRICLE and mirisim.
chmod +x mirisim_install.bash
- To install a certain version of MIRISim MIRICLE, execute the following lines:
chmod +x mirisim_install.bash
./mirisim_install.bash --version <VERSIONNUMBER>
- To start MIRISim-MIRICLE, do the following:
conda activate mirisim
ipython notebook --pylab This will start up the ipython environment in your browser.
Quick Installation Check
The installation can be checked with the following Python commands
>>> import miri
>>> print( miri.__version__ )
>>> import mirisim
>>> print( mirisim.version.__version__ )
which will also tell you which version of the MIRI software and MIRISim you have installed. Entering the command
should bring up some help information. Please visit the MIRISim page?
for more information.
Updating can be done by re-executing the
script. The installation script will check if there is an update available. If this is not the case, the script will ask if you want to reinstall the already installed version.
- If Anaconda messes up your .bashrc file you can restore it from .bashrc-anaconda.bak.
- Users of shells other than bash may need to change to the bash shell before using "conda activate".
- If the "conda activate" command is not recognised, please try "source activate". However, this would suggest you have an old conda installation, so see the next point.
- If you see error messages when attempting to fetch new packages (typically after the "Fetching package metadata..." or "Downloading and Extracting Packages" messages), then you might have an out of date version of conda. Try the commands:
conda update conda
conda update anaconda and try running the MIRISim-MIRICLE install script again.
- Similarly, if you are experiencing issues with packages, it may be worth trying a clean re-install directly from the source, by cleaning your local cache of install packages with:
conda clean --all
- The anaconda installation requires a lot of disk space (several GB). If you see disk quota errors, check you have defined a MIRISIM_ROOT environment variable. If you run out of disk space, the old, date-stamped environments within the anaconda/envs directory can be removed.
- Anaconda MUST NOT be installed with administrator rights. It will mess up your whole anaconda+mirisim installation. If you can't install any packages inside anaconda, that's one hint that your anaconda installation is wrong. To check, see what "ls -lh" return in the anaconda folder. If "root" appears, you're a victim of "root installation".
- On a Mac, the backend of matplotlib should be set to Qt5Agg. You should do this in ~/.matplotlib/matplotlibrc
- The installation of some packages only works when the LANG environment variable is set to en_US.UTF-8. You can do this by adding
export LANG=en_US.UTF-8 to your .bash_profile.
- February 2020: Please note that MIRISim-MIRICLE installation script can no longer install builds 9 or earlier (corresponding to MIRISim release 2.1.0 or earlier), due to the discontinuation of package channels at Anaconda and STScI. If you are upgrading from build 9 (MIRISim 2.1.0) or earlier, please first manually remove any existing "mirisim" conda enviroment, e.g. with:
conda env remove -n mirisim If this is not done, the install script will likely fail during the creation of a clone of your existing "mirisim" conda environment (with a "CondaHTTPError"), due to it being unable to reach the discontinued channels at Anaconda / STScI.
- February 2020: Please note that the auto-update mechanism for MIRISim installation scripts that were downloaded prior to February 2020 will not work. Please re-download the installation script from the link above.
- September 2020: Please note that earlier versions of MIRISim-MIRICLE used an older version of "conda-build" and used a Conda channel at STScI that has since been discontinued. When you re-run the install script, if you experience a "ParseError", please try:
conda activate base
conda config --remove channels http://ssb.stsci.edu/conda-dev
conda update conda-build and then re-try the installation script.
No script named 'mirisim'
This problem occurs when you install manually the MIRISim package into a Python environment where it already exists. The solution is to delete manually the existing MIRISim package then reinstall it.