Take a deep breath. I am afraid this is going to take a while. You might consider following our instructions for [Installing LSDTopoTools using VirtualBox and Vagrant] instead of trying to get the software installed within a Windows environment.
Note
|
It is MUCH easier to run LSDTopoTools software in Vagrant server, but you should install programs for looking at your data (i.e., python, a GIS) on your host operating system (in this case Windows). |
In [Software] you can read about the various options for text editors, and why we recommend Brackets. Go to its website for the download.
Download and install git for windows.
There will be some options for you to select once you do this: the main one is something about line endings. I chose the "don’t change line endings" option.
Once this is installed you can right click on any folder in windows explorer and select the option git bash here
. This will open a powershell window with git enabled. From there you can follow the instructions in the git chapter of this book.
The best way to install python is miniconda. We will use Python 2.7, so use the Python 2.7 installer.
Once you have installed that, you can go into a powershell and get the other stuff you need:
PS> conda install scipy
PS> conda install matplotlib
PS> conda install pandas
PS> conda install gdal
PS> conda install spyder
To run spider you just type spyder
at the command line.
Warning: Spyder needs an older version of a package called PyQt. If spyder doesn’t start correctly, run conda install pyqt=4.10 -f
Below are popular distributions but I’ve found miniconda is best. I learned this the hard way so you don’t have to.
-
Python(x,y) contains all manner of useful packages for scientists. I have found, however, that updating this is not so straightforward; if you have a look at the Python(x,y) downlaods page you will see that the updates have dependencies that dead end, so if you are on, say, Python(x,y) 2.6.X you will need to reinstall Python(x,y) 2.7.X if you want continued updates. Python(x,y) is also huge: it includes many python packages, most of which you will never use.
-
Winpython is another python package that has a nice updating interface.
-
Anaconda is another scientific package that includes all sorts of smaller packages. It seems to be able to handle updates better than Python(x,y) through its
conda
updating interface.
You might want to look at your data in a GIS, and [http://www.qgis.org/en/site/]QGIS is a nice open-source option. Here are the QGIS Windows downloads.
Many of our python plotting scripts can output figures in svg format, which you can then edit in Inkscape, an open source editor that is similar to Illustrator. Inkscape also is happy with .ai
, .pdf
and .eps
files.
Here are the Inkscape Windows downloads.
There are several options for installing C++ and fortran compilers on your Windows machine. Two popular options, Mingw and https://www.cygwin.com/Cygwin] install something that behaves a bit like a Linux operating system (but you really should follow our Vagrant instructions instead.).
Important
|
This is for information only. You should use Vagrant instead. |
Another option for C++ is to install the developer toolkit from Microsoft, Visual Studio express. You can install the 2013 version using chocolatey:
PS> choco install visualstudioexpress2013windowsdesktop
You can also install the software by downloading from the Visual Studio website.
Important
|
This is for information only. You should use Vagrant instead. |
To install Cygwin, you must first install the program setup-x86.exe for a 32 bit system or setup-x86_64 for a 64 bit system.
When you run setup-*.exe
, you will get a window that looks like this:
Scroll down the the devel
menu and select the following packages:
binutuls gcc core g++ gfortran gdb make
You can also install all sorts of other things from cygwin like Ruby, Git and Python, but you don’t need to do that if you’ve already installed them. In fact, you might want to make sure git is not selected if you have installed the Git powershell from the github desktop application.
Once you have selected the things you need, select next. You might need to install a bunch of additional packages because your selected packages depend on them. If this is your first time installing cygwin go and get a drink or have lunch since installation will take some time.
Some of our more specialized components require libraries. These are very difficult to install on Windows, and you will possibly self harm if you attempt to do so. Many of them are installed automatically using our vagrantfiles. Why don’t you make a Linux server with Vagrant instead?
The <<LSDTopoTools vagrant setup installs GDAL for you on your Linux server. You also have GDAL python bindings if you follow our python instructions.
If you still really want a native version of GDAL (which is crazy, but it is your life), you can download GDAL for windows from this website: https://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries. If you are on Windows, however, you might want to just use the GDAL bindings
Installing Ruby is only necessary if you want to play with our documentation, an perhaps add to it.
You can check to see if Ruby is installed on your system by typing
PS> ruby -v
and you can check the Rubygems version with
PS> gem -v
-
Download and install Ruby: https://www.ruby-lang.org/en/documentation/installation/#rubyinstaller. We have used version 2.2.
-
Download and install Ruby Gems: https://rubygems.org/pages/download. To install this, you need to download it and then open a powershell window, navigate to the folder with gems in it, and run:
PS> \folder\with\rubygems\> ruby setup.rb
-
Download the Ruby devtools: http://rubyinstaller.org/downloads/. You need to unzip this and run two things:
PS> \folder\with\DevKit\> ruby dk.rb init PS> \folder\with\DevKit\> ruby dk.rb install
-
Now install bundler. In a powershell, you can, from anywhere, type
gem install bundler
.
At the time of this writing, rubygems is "broken" on Windows: if you try to install a gem file you will get an error that says you cannot make an SSL connection. You will need to fix this problem by copying a trust certificate into you rubygems folder.
-
First download the file AddTrustExternalCARoot-2048.pem.
Warning
|
It seems some browsers add formatting to this file when downloaded (Chrome does this, for example). I only managed to get this fix to work after downloading the file using Internet Explorer. |
-
Next, find the location of your gems installation:
PS> gem which rubygems
C:/Ruby21/lib/ruby/2.1.0/rubygems.rb
-
Go to the folder and then go into the SLL_certs subfolder. In this case it is at:
C:/Ruby21/lib/ruby/2.1.0/rubygems/SSL_certs
. Copy the.pem
file into this folder. Rubygems should now work.
The devkit sometimes does not work the first time around. If you get error messages about the devkit, you should go to the devkit folder (you need to find it on your system) and run:
PS> ruby dk.rb init
This will generate a file called config.yml
. Sometimes, the devkit installer will not find your Ruby installation, so you will need to add the path to your Ruby installation to this file.
For example, if your Ruby instalation is sitting in C:/Ruby21/, then you should modify the config.yml
file to look like:
# This configuration file contains the absolute path locations of all
# installed Rubies to be enhanced to work with the DevKit. This config
# file is generated by the 'ruby dk.rb init' step and may be modified
# before running the 'ruby dk.rb install' step. To include any installed
# Rubies that were not automagically discovered, simply add a line below
# the triple hyphens with the absolute path to the Ruby root directory.
#
# Example:
#
# ---
# - C:/ruby19trunk
# - C:/ruby192dev
#
---
- C:/Ruby21/
From here we can install some useful ruby gems. Asciidoctor is really great for writing documentation. Bundler is useful for keeping Ruby packages up to date.
PS> gem install asciidoctor
PS> gem install bundler
This is for users who are trying to get a Ruby extension that uses Java installed. If you use an extension that need a java link, you will need the gem
PS> gem install rjb -v '1.4.9'
But on my system this failed because you need to define the java runtime home. To do this, you need to figure out where your java installation is, and then define an environemnt variable $JAVA_HOME to point to this directory.
To do so, you should do this (in an administrator Powershell):
PS> [Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\Progra~2\Java\jre_7_55", "Machine")
Note that the powershell abbreviates Program files (x86)
as Progra~2 and Program Files
as Progra~1.
You can check to see if the appropriate path has been set with:
PS> Get-ChildItem Env:
Unfortuately this only works in an administrator window.
If you actually managed to install things on Windows without permanent emotional scarring, I offer my sincerest congratulations. However, if you are just skipping ahead, why don’t you make your life easier and <<[Installing LSDTopoTools using VirtualBox and Vagrant],use our (relatively) painless Vagrant setup>>? You should still install python, however.