Commit d3e3577b authored by Christoph Groth's avatar Christoph Groth
Browse files

update installation instructions for Debian/Ubuntu

parent 80e74b93
......@@ -4,7 +4,6 @@ Installing Kwant
License and citation request
============================
Kwant is free software covered by the `2-clause BSD license </license>`_.
If you have used Kwant for work that has lead to a scientific publication,
......@@ -60,19 +59,20 @@ building `from source <#building-from-source>`_.
Debian and derivatives
----------------------
The easiest way to install Kwant on a Debian system is using the pre-built
packages we provide. Our packages are known to work with Debian "stable" and
Debian "testing", but they may also work on many other recent Debian-derived
systems as well. (For example, the following works with recent Ubuntu
versions, too.)
packages we provide. We target Debian "stable" and Debian "testing", but our
packages may also work on many other recent Debian-derived distributions as
well.
The lines prefixed with ``sudo`` have to be run as root.
The following instructions will install Kwant on Debian stable "jessie".
They need to be executed as root.
(To install on Debian testing "stretch", repace "jessie-backports" with "testing".)
1. Add the following lines to ``/etc/apt/sources.list``::
deb http://downloads.kwant-project.org/debian/ stable main
deb-src http://downloads.kwant-project.org/debian/ stable main
deb http://ftp.debian.org/debian jessie-backports main
deb http://downloads.kwant-project.org/debian/ jessie-backports main
deb-src http://downloads.kwant-project.org/debian/ jessie-backports main
2. (Optional) Add the OpenPGP key used to sign the repositories by executing::
......@@ -83,32 +83,15 @@ The lines prefixed with ``sudo`` have to be run as root.
3. Update the package data, and install Kwant::
sudo apt-get update
sudo apt-get install python3-kwant python-kwant-doc
apt-get update
apt-get -t jessie-backports install python3-kwant python-kwant-doc
The ``python-kwant-doc`` package is optional and installs the HTML
documentation of Kwant in the directory ``/usr/share/doc/python-kwant-doc``.
Should the last command (``apt-get install``) fail due to unresolved
dependencies, you can try to build and install your own packages::
cd /tmp
sudo apt-get build-dep tinyarray
apt-get source --compile tinyarray
sudo dpkg --install python3-tinyarray_*.deb
sudo apt-get build-dep kwant
apt-get source --compile kwant
sudo dpkg --install python3-kwant_*.deb python-kwant-doc_*.deb
This method should work for all Debian-derived systems, even on exotic
architectures.
Ubuntu and derivatives
----------------------
The easiest way to install Kwant on a Debian system is using the pre-built
packages we provide. Execute the following commands in a terminal::
......@@ -116,14 +99,40 @@ packages we provide. Execute the following commands in a terminal::
sudo apt-get update
sudo apt-get install python3-kwant python-kwant-doc
This should provide Kwant for all versions of Ubuntu >= 12.04. The HTML
This should provide up-to-date Kwant for all recent versions of Ubuntu,
up to at least the last LTS version. The HTML
documentation will be installed locally in the directory
``/usr/share/doc/python-kwant-doc``.
Debian or Ubuntu: building packages from source
-----------------------------------------------
It is straightforward to build Debian/Ubuntu packages from source. This can be
useful when the installation from pre-built packages has failed for some
reason (e.g. for non-x86 CPUs).
As a prerequisite, a ``deb-src`` entry for Kwant is needed in
``/etc/apt/sources.list``. (It will be present if either of the above
instructions for Debian or for Ubuntu have been followed.)
FIrst, install the build dependencies (as root)::
apt-get build-dep tinyarray kwant
Then, compile Tinyarray and Kwant. This may be done as a normal user. ::
cd /tmp
apt-get source --compile tinyarray
apt-get source --compile kwant
Finally, install the built packages (again as root)::
dpkg --install python3-tinyarray_*.deb
dpkg --install python3-kwant_*.deb python-kwant-doc_*.deb
Arch Linux
----------
`Arch install scripts for Kwant
<https://aur.archlinux.org/packages/python-kwant/>`_ are kindly provided by
Jörg Behrmann (formerly by Max Schlemmer). To install, follow the `Arch User
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment