diff --git a/content/install.txt b/content/install.txt index de3a52e0b70908120faa388d2a76ae1bff91e69e..2aa4a639e36e3c643e9607a04d57bac20819354b 100644 --- a/content/install.txt +++ b/content/install.txt @@ -114,87 +114,23 @@ Arch Linux To install, follow the `Arch User Repository installation instructions <https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages>`_. -Mac OS X -======== - -There is a number of different package managers to bring software -from the Unix/Linux world to Mac OS X. Since the community is quite -split, we provide Kwant and its dependencies both via the `MacPorts -<http://www.macports.org>`_ and `Homebrew <http://brew.sh>`_ systems. -If you are unsure, go for MacPorts, this is the simpler option. - -Mac OS X: MacPorts -================== - -MacPorts is a full-fledged package manager that recreates a whole Linux-like -environment on your Mac. Beside Kwant, MacPorts gives you access to a wealth of free software which you can install on your computer -easily (using simple command line instructions). It requires few choices to be made by the user, -and provides the simplest way to install Kwant. - -In order to install Kwant, - -1. Install a recent version of MacPorts. In order to do that, you first have to install - the prerequisites described below. When this is done, you can proceed with the installation of - MacPorts itself, as explained in the `installation instructions of MacPorts - <http://www.macports.org/install.php>`_. The prerequisites are, - - * the Xcode developer tools (compiler suite for Mac OS X) from - `<http://developer.apple.com/downloads>`_. You will need an Apple ID to - download. Note that if you have one already from using the App store - on the Mac/Ipad/Iphone/... you can use that one. You will also need the - command line tools: Within Xcode 4, you have to download them by going to - `Xcode->Preferences`, click on `Download`, go to `Components`, - select `Command Line Tools` and click on `Install`. Alternatively, you can - also directly download the command line tools from the - Apple developer website. - * if you have Mac OS X 10.8 or higher, the X11 server from the - `XQuartz project <http://xquartz.macosforge.org>`_. - -2. After the installation, open a terminal and execute :: - - echo http://downloads.kwant-project.org/macports/ports.tar |\ - sudo tee -a /opt/local/etc/macports/sources.conf >/dev/null - - (this adds the Kwant MacPorts download link - `<http://downloads.kwant-project.org/macports/ports.tar>`_ at the end of the - ``sources.conf`` file.) - -3. Execute :: - - sudo port selfupdate - -4. Now, install Kwant and its prerequisites :: - - sudo port install py27-kwant - -5. Finally, we choose Python 2.7 to be the default Python :: - - sudo port select --set python python27 - - After that, you will need to close and reopen the terminal to - have all changes in effect. - -Notes: +Mac OSX +======= -* If you have problems because your institution's firewall blocks MacPorts (more - precisely, the `rsync` port), resulting in errors from ``sudo port - selfupdate``, follow `these instructions - <https://trac.macports.org/wiki/howto/PortTreeTarball>`_. -* Of course, if you already have MacPorts installed, you can skip step 1 - and continue with step 2. +There is a number of different package managers for bringing software from the +Unix/Linux world to Mac OSX. Since the community is quite split, we provide +Kwant and its dependencies both via the `homebrew <http://brew.sh>`_ and the +`MacPorts <http://www.macports.org>`_ systems. -Mac OS X: Homebrew +Mac OS X: homebrew ================== -Homebrew is a recent addition to the package managers on Mac OS X. It is -more lightweight, tries to be as minimalistic as possible and give the user -more freedom. Because of that, it requires a little more experience on -the user side compared to MacPorts. The requirements are moderate though, -if you know how to add directories to the ``$PATH`` variable for your shell, -you are safe. +homebrew is a recent addition to the package managers on Mac OSX. It is +lightweight, tries to be as minimalistic as possible and give the user +freedom than Macports. We recommend this option if you have no preferences. -1. Open a terminal and install Homebrew as described on the `Homebrew +1. Open a terminal and install homebrew as described on the `homebrew homepage <http://brew.sh>`_ (instructions are towards the end of the page) @@ -205,7 +141,7 @@ you are safe. and follow its directions. It will ask for a few prerequisites to be installed, in particular - * the Xcode developer tools (compiler suite for Mac OS X) from + * the Xcode developer tools (compiler suite for Mac OSX) from `<http://developer.apple.com/downloads>`_. You will need an Apple ID to download. Note that if you have one already from using the App store on the Mac/Ipad/Iphone/... you can use that one. Downloading the command line @@ -216,7 +152,7 @@ you are safe. click on `Install`. * although `brew doctor` might not complain about it right away, while we're at it, you should also install the X11 server from the `XQuartz project - <http://xquartz.macosforge.org>`_ if you have Mac OS X 10.8 or higher. + <http://xquartz.macosforge.org>`_ if you have Mac OSX 10.8 or higher. 3. Add permanently ``/usr/local/bin`` before ``/usr/bin/`` in the ``$PATH$`` environment variable of your shell, for example by adding :: @@ -224,21 +160,21 @@ you are safe. export PATH=/usr/local/bin:$PATH at the end of your ``.bash_profile`` or ``.profile``. Then close - the terminal Terminal and reopen it again. + the terminal and reopen it again. 4. Install a few prerequisites :: - brew install gcc python + brew install gfortran python 5. Add additional repositories :: brew tap homebrew/science - brew tap homebrew/python + brew tap samueljohn/python brew tap michaelwimmer/kwant 6. Install Kwant and its prerequisites :: - pip install nose six + pip install nose brew install numpy scipy matplotlib brew install kwant @@ -246,11 +182,71 @@ Notes: - If something does not work as expected, use ``brew doctor`` for instructions (it will find conflicts and things like that). -- As mentioned, Homebrew allows for quite some freedom. In particular, +- As mentioned, homebrew allows for quite some freedom. In particular, if you are an expert, you don't need necessarily to install - numpy/scipy/matplotlib from Homebrew, but can use your own installation. - The only prerequisite is that they are importable from Python. (the + numpy/scipy/matplotlib from homebrew, but can use your own installation. + The only prerequisite is that they are importable from python. (the Kwant installation will in any case complain if they are not) -- In principle, you need not install the Homebrew Python, but could use - Apple's already installed Python. Homebrew's Python is more up-to-date, +- In principle, you need not install the homebrew python, but could use + Apple's already installed python. Homebrew's python is more up-to-date, though. + + +Mac OSX: MacPorts +================= + +MacPorts is a full-fledged package manager that recreates a whole Linux-like +environment on your Mac. + +In order to install Kwant using MacPorts, you have to + +1. Install a recent version of MacPorts, as explained in the + `installation instructions of MacPorts + <http://www.macports.org/install.php>`_. + In particular, as explained there, you will have to install also a + few prerequisites, namely + + * the Xcode developer tools (compiler suite for Mac OSX) from + `<http://developer.apple.com/downloads>`_. You will need an Apple ID to + download. Note that if you have one already from using the App store + on the Mac/Ipad/Iphone/... you can use that one. You will also need the + command line tools: Within Xcode 4, you have to download them by going to + `Xcode->Preferences`, click on `Download`, go to `Components`, + select `Command Line Tools` and click on `Install`. Alternatively, you can + also directly download the command line tools from the + Apple developer website. + * if you have MacOSX 10.8 or higher, the X11 server from the + `XQuartz project <http://xquartz.macosforge.org>`_. + +2. After the installation, open a terminal and execute :: + + echo http://downloads.kwant-project.org/macports/ports.tar |\ + sudo tee -a /opt/local/etc/macports/sources.conf >/dev/null + + (this adds the Kwant MacPorts download link + `<http://downloads.kwant-project.org/macports/ports.tar>`_ at the end of the + ``sources.conf`` file.) + +3. Execute :: + + sudo port selfupdate + +4. Now, install Kwant and its prerequisites :: + + sudo port install py27-kwant + +5. Finally, we choose python 2.7 to be the default python :: + + sudo port select --set python python27 + + After that, you will need to close and reopen the terminal to + have all changes in effect. + +Notes: + +* If you have problems with macports because your institution's firewall + blocks macports (more precisely, the `rsync` port), resulting in + errors from ``sudo port selfupdate``, follow + `these instructions <https://trac.macports.org/wiki/howto/PortTreeTarball>`_. +* Of course, if you already have macports installed, you can skip step 1 + and continue with step 2.