Installation for CMEA II: --------------------------- This guide will show you how to install the necessary software for the course CMEA II at ETHZ. It is split into Windows, Linux and Mac OS X. If you use any other OS, you are on your own. In this course, we require that you have the following available: 1) A C++ compiler (GCC, clang or MSVC) 2) Python (with matplotlib) or MATLAB for plotting 3) cmake All template code will require these packages to compile and run. You can get MATLAB for free from https://ides.ethz.ch if you are a student at ETHZ. NOTE: If you followed and completed the CMEA I course, you will probably have a C++ compiler installed already, in which case you only need cmake and the plotting tools (python or matlab). ## Linux On Linux we recommend that you use the package manager. If you want to do it by hand, consult the documentation on each package. The packages we will install are: 1) GCC (https://gcc.gnu.org/) 2) Python (https://www.python.org/) 3) numpy (http://www.numpy.org/) 4) matplotlib (http://matplotlib.org/) For installing MATLAB, consult https://ides.ethz.ch on how to do this. If you wish to install MATLAB and not use Python, you can skip the python packages to save space. ### Ubuntu Linux Run the following command from the terminal: sudo apt-get install python python-numpy python-matplotlib gcc cmake gdb When prompted for a password, insert your user's password. You will also be prompted if you want to install the packages, answer "Y". ### Fedora Linux Run the following command from the terminal sudo yum install numpy python-matplotlib gcc cmake gcc-c++ gdb ### Other version of Linux: Ask or use Google. ## Windows On Windows, you have two options for getting a C++-compiler: 1) Microsoft Visual Studio Community [Free for students] 2) Cygwin with GCC [Free] Microsoft Visual Studio offers a complete Integrated Development Enviroment (IDE), and it is very nice for large projects. Some people feel it is a bit of an overkill for the small projects we will make. Cygwin on the other hand, gives you the Linux toolchain on Windows. Visual Studio also comes with a GUI for debugging, making debugging your applications a lot easier. We recommend that you use Microsoft Visual Studio for Windows, but if you are more comfortable with the Linux command line, you can go for the Cygwin way. You can choose between using MATLAB or Python for plotting. If you want to use MATLAB, consult https://ides.ethz.ch on how to do this. ### Installing Microsoft Visual Studio If you plan to use Cygwin, you do not have to use Microsoft Visual Studio. Download the Visual Studio Community 2015 from https://go.microsoft.com/fwlink/?LinkId=532606&clcid=0x409 (link tested on 2015-09-23, if it doesn't work, go to https://www.visualstudio.com/ and select "Download Community 2015") If you get Visual Studio, you will also need the cmake installer from http://cmake.org/files/v3.3/cmake-3.3.2-win32-x86.exe latest version can be downloaded from: http://cmake.org/download/ ### Installing Cygwin If you plan to use Visual Studio, you do not have to install Cygwin. Download the Cygwin installer: https://www.cygwin.com/setup-x86_64.exe and run it. Following the prompts until you come to the "Select packages" step. Here you should mark the following packages for installation: * Devel / gcc-g++ * Devel / cmake * X11 / xinit * Devel / gdb You may also wish to install your favourite editor. Both vim and emacs are available under Editors. NOTE: You can always rerun the installer to add more packages or remove things you do not need. NOTE: While you can install Python from cygwin, getting Matplotlib is not so easy, this is why we recommend installing Python the normal way on Windows. ### Installing Python on Windows You do not have to install Python if you plan to use MATLAB. We only install the 32-bits packages here. You are on your own if you want the 64-bit version. 1) Download and install Python from https://www.python.org/ftp/python/2.7.10/python-2.7.10.msi (link checked at 2015-09-23, for the latest version, go to https://www.python.org) 2) Download numpy from http://sourceforge.net/projects/numpy/files/NumPy/1.9.2/numpy-1.9.2-win32-superpack-python2.7.exe/download (link checked at 2015-09-23, for the latest version, go to http://www.scipy.org/scipylib/download.html) 3) Download matplotlib from https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.4.3/windows/matplotlib-1.4.3.win32-py2.7.exe (link checked at 2015-09-23, for the latest version, go to http://matplotlib.org/downloads.html) ## Mac OS X For MATLAB installation, consult https://ides.ethz.ch NOTE: On Mac OS X it is also possible to use a package manager (homebrew). If you plan to install a lot of extra development software, this can be a good idea. See http://brew.sh/ for more information. This is NOT required for this course. We recommend that you use the guide below. ### C++ compiler We recommend that you get Xcode from the App Store (free): https://itunes.apple.com/ch/app/xcode/id497799835?mt=12 After you have downloaded and installed xcode, you may have to install the command line tools. Open Xcode, and go to "Xcode" > "Preferences" > "Downloads" and select "Command Line Tools". NOTE: On newer versions, this is no longer required! ### CMake Download and install the .dmg-file from: http://cmake.org/files/v3.3/cmake-3.3.2-Darwin-x86_64.dmg (tested on 2015-09-23, for the latest version go to http://cmake.org/download/ ) After you have installed cmake, you will want to enable it for command line use. Open the graphical "CMake" application (should be somewhere under your Applications), and select "Tools" > "How to install for command line use" The easiest option is to go for the symlink command, meaning you will have to run the following command in the Terminal: sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install ### Python If you have the newest version of OS X, your python version should already be up to date for the course. To install the numpy package, open the Terminal and enter the command sudo easy_install numpy matplotlib which should automatically install the software you need.