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

update windows instructions: windows command shell has no globs

parent 77d5676a
Pipeline #235 passed with stage
......@@ -302,20 +302,36 @@ provided by Christoph Gohlke. To install Kwant on Windows
5. Reboot your computer.
6. Download the necessary packages (with the ending ``.whl``) for your
operating system (32 or 64 bit) and Python version (e.g. ``cp34`` for Python
3.4) from the website of `Christoph Gohlke
<http://www.lfd.uci.edu/~gohlke/pythonlibs/>`_. For Kwant, we recommend to download at least `NumPy <http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy>`_, `SciPy <http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy>`_, `Matplotlib <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>`_, `Nose <http://www.lfd.uci.edu/~gohlke/pythonlibs/#nose>`_, `Tinyarray <http://www.lfd.uci.edu/~gohlke/pythonlibs/#tinyarray>`_, and `Kwant <http://www.lfd.uci.edu/~gohlke/pythonlibs/#kwant>`_ itself.
operating system (32 or 64 bit) and Python version (e.g. ``cp34`` for
Python 3.4) from the website of `Christoph Gohlke
<http://www.lfd.uci.edu/~gohlke/pythonlibs/>`_. For Kwant, we recommend to
download at least `NumPy
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy>`_, `SciPy
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy>`_, `Matplotlib
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>`_, `Nose
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#nose>`_, `Tinyarray
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#tinyarray>`_, and `Kwant
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#kwant>`_ itself. Make sure to
put the downloaded files into a directory with no other ``.whl`` files.
7. Now open a command prompt with administrator rights, as described in
"How do I run a command with elevated permissions" at the
`Microsoft Windows website <http://windows.microsoft.com/en-us/windows/command-prompt-faq>`_.
7. Open a command prompt with administrator rights, as described in “How do I
run a command with elevated permissions at the `Microsoft Windows website
<http://windows.microsoft.com/en-us/windows/command-prompt-faq>`_.
In this new command prompt window, execute ::
Go to the directory with the ``.whl`` files, e.g.::
pip3 install --no-deps *.whl
cd c:\Users\YOUR_USERNAME\Downloads
(This will install all the wheel-files in the current directory.)
Now you are done, you can ``import kwant`` from within Python scripts.
To install all the ``.whl``-files in the current directory, execute ::
python3 -c "import pip, glob; pip.main(['install', '--no-deps'] + glob.glob('*.whl'))"
The above cryptic command is equivalent to ``pip3 install --no-deps
*.whl``, i.e. it installs all the wheel files in the current directory
using pip. Because the Windows command interpreter does not support globs,
we have to rely on the globbing as provided by Python itself.
Now you are done, you can ``import kwant`` from within Python scripts.
(Note that many other useful scientific packages are available in Gohlke’s
repository. For example, you might want to install `IPython
......
Supports Markdown
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